fix mem leak

This commit is contained in:
kason 2024-09-16 11:22:03 +08:00
parent 6e2e68fd08
commit 181c5b2e85

View file

@ -5556,6 +5556,10 @@ void __JS_FreeValueRT(JSRuntime *rt, JSValue v)
if (rt->gc_phase == JS_GC_PHASE_NONE) { if (rt->gc_phase == JS_GC_PHASE_NONE) {
free_zero_refcount(rt); free_zero_refcount(rt);
} }
} else if (p->mark == 0) {
p->mark = 1;
list_del(&p->link);
list_add_tail(&p->link, &rt->tmp_obj_list);
} }
} }
break; break;