Skip to content

Commit d100933

Browse files
past-dueFabrice Bellard
authored andcommitted
removed module leak in js_std_eval_binary()
Port of bellard/quickjs@1fdc768 Co-authored-by: Fabrice Bellard <fabrice@bellard.org>
1 parent b0eb4fe commit d100933

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

quickjs-libc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4586,6 +4586,7 @@ void js_std_eval_binary(JSContext *ctx, const uint8_t *buf, size_t buf_len,
45864586
if (js_module_set_import_meta(ctx, obj, false, false) < 0)
45874587
goto exception;
45884588
}
4589+
JS_FreeValue(ctx, obj);
45894590
} else {
45904591
if (JS_VALUE_GET_TAG(obj) == JS_TAG_MODULE) {
45914592
if (JS_ResolveModule(ctx, obj) < 0) {

0 commit comments

Comments
 (0)