[bugfix] do not release pic->var_tbl when a senv holding it is dead

This commit is contained in:
Yuichi Nishiwaki 2013-11-26 09:00:16 -08:00
parent e7673c65bd
commit cbd636e0a7
1 changed files with 5 additions and 3 deletions

View File

@ -424,9 +424,11 @@ gc_finalize_object(pic_state *pic, struct pic_object *obj)
}
case PIC_TT_SENV: {
struct pic_senv *senv = (struct pic_senv *)obj;
xh_destory(senv->tbl);
if (senv->stx)
pic_free(pic, senv->stx);
if (senv->up) {
xh_destory(senv->tbl);
if (senv->stx)
pic_free(pic, senv->stx);
}
break;
}
case PIC_TT_SYNTAX: {