Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Clear REPR_data pointer after freeing the data, just in case.
  • Loading branch information
jnthn committed Feb 28, 2012
1 parent cff103f commit f6c39dc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/6model/serialization.c
Expand Up @@ -1582,8 +1582,10 @@ void repossess(PARROT_INTERP, SerializationReader *reader, INTVAL i) {

/* Clear it up, since we'll re-allocate all the bits inside
* it on deserialization. */
if (STABLE_STRUCT(orig_st)->REPR->gc_free_repr_data)
if (STABLE_STRUCT(orig_st)->REPR->gc_free_repr_data) {
STABLE_STRUCT(orig_st)->REPR->gc_free_repr_data(interp, STABLE_STRUCT(orig_st));
STABLE_STRUCT(orig_st)->REPR_data = NULL;
}

/* Put it into STables root set at the apporpriate slot. */
VTABLE_set_pmc_keyed_int(interp, reader->stables_list,
Expand Down

0 comments on commit f6c39dc

Please sign in to comment.