Skip to content

Commit f6c39dc

Browse files
committed
Clear REPR_data pointer after freeing the data, just in case.
1 parent cff103f commit f6c39dc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/6model/serialization.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1582,8 +1582,10 @@ void repossess(PARROT_INTERP, SerializationReader *reader, INTVAL i) {
15821582

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

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

0 commit comments

Comments
 (0)