Fix crash in mrb_parser_free() due to freed memory access

This commit is contained in:
Takashi Sawanaka
2016-07-23 11:34:04 +09:00
parent 97283faa16
commit 2eefbfed9d
+1 -1
View File
@@ -5516,10 +5516,10 @@ mrb_parser_new(mrb_state *mrb)
MRB_API void
mrb_parser_free(parser_state *p) {
mrb_pool_close(p->pool);
if (p->tokbuf != p->buf) {
mrb_free(p->mrb, p->tokbuf);
}
mrb_pool_close(p->pool);
}
MRB_API mrbc_context*