From 8dde647a512e5f3ff08e40edbd7a8b7eeb934071 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Fri, 10 Jun 2016 10:04:52 +0900 Subject: add temporary workaround for irep memory corruption need to find out real memory bug that appears in full-debug/mrbtest --- src/state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/state.c') diff --git a/src/state.c b/src/state.c index 898e77336..1259ac3a0 100644 --- a/src/state.c +++ b/src/state.c @@ -141,7 +141,7 @@ mrb_irep_free(mrb_state *mrb, mrb_irep *irep) if (!(irep->flags & MRB_ISEQ_NO_FREE)) mrb_free(mrb, irep->iseq); - for (i=0; iplen; i++) { + if (irep->pool) for (i=0; iplen; i++) { if (mrb_type(irep->pool[i]) == MRB_TT_STRING) { mrb_gc_free_str(mrb, RSTRING(irep->pool[i])); mrb_free(mrb, mrb_obj_ptr(irep->pool[i])); -- cgit v1.2.3