Skip to content

Commit 8dde647

Browse files
committed
add temporary workaround for irep memory corruption
need to find out real memory bug that appears in full-debug/mrbtest
1 parent 6b0299f commit 8dde647

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/state.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ mrb_irep_free(mrb_state *mrb, mrb_irep *irep)
141141

142142
if (!(irep->flags & MRB_ISEQ_NO_FREE))
143143
mrb_free(mrb, irep->iseq);
144-
for (i=0; i<irep->plen; i++) {
144+
if (irep->pool) for (i=0; i<irep->plen; i++) {
145145
if (mrb_type(irep->pool[i]) == MRB_TT_STRING) {
146146
mrb_gc_free_str(mrb, RSTRING(irep->pool[i]));
147147
mrb_free(mrb, mrb_obj_ptr(irep->pool[i]));

0 commit comments

Comments
 (0)