Skip to content

Commit

Permalink
fix mem leak
Browse files Browse the repository at this point in the history
  • Loading branch information
kasonyang committed Sep 16, 2024
1 parent 6e2e68f commit 181c5b2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions quickjs.c
Original file line number Diff line number Diff line change
Expand Up @@ -5556,6 +5556,10 @@ void __JS_FreeValueRT(JSRuntime *rt, JSValue v)
if (rt->gc_phase == JS_GC_PHASE_NONE) {
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;
Expand Down

0 comments on commit 181c5b2

Please sign in to comment.