*fixed a forked structure disposing issue if error occurs.

This commit is contained in:
Wang Renxin 2017-05-17 21:18:50 +08:00
parent 2a6b94f857
commit 10098a7e36
2 changed files with 5 additions and 3 deletions

View File

@ -1,3 +1,6 @@
May. 17 2017
Fixed a forked structure disposing issue if error occurs
May. 15 2017
Added mb_get_gc_enabled and mb_set_gc_enabled functions

View File

@ -11467,9 +11467,8 @@ int mb_close_forked(struct mb_interpreter_t** s) {
src = *s;
while(mb_get_forked_from(src, &src) == MB_FUNC_OK) { /* Do nothing */ }
if(!src->valid)
(*s)->forked_context->prev = 0;
(*s)->running_context = (*s)->forked_context;
(*s)->running_context->prev = 0;
_dispose_scope_chain(*s);
_ls_foreach((*s)->edge_destroy_objects, _destroy_object);