mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #6159 from dearblue/debug/irep-free
Allow to detect use-after-free after `mrb_irep_free()` for debugging
This commit is contained in:
@@ -161,6 +161,9 @@ mrb_irep_free(mrb_state *mrb, mrb_irep *irep)
|
||||
}
|
||||
mrb_free(mrb, (void*)irep->lv);
|
||||
mrb_debug_info_free(mrb, irep->debug_info);
|
||||
#ifdef MRB_DEBUG
|
||||
memset(irep, -1, sizeof(*irep));
|
||||
#endif
|
||||
mrb_free(mrb, irep);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user