Skip to content

Commit de4d392

Browse files
author
Fabrice Bellard
committed
removed memory leak (#441)
1 parent dc7af0a commit de4d392

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

quickjs.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40802,8 +40802,10 @@ static JSValue js_array_every(JSContext *ctx, JSValueConst this_val,
4080240802
goto exception;
4080340803
args[0] = ret;
4080440804
res = JS_Invoke(ctx, arr, JS_ATOM_set, 1, args);
40805-
if (check_exception_free(ctx, res))
40805+
if (check_exception_free(ctx, res)) {
40806+
JS_FreeValue(ctx, arr);
4080640807
goto exception;
40808+
}
4080740809
JS_FreeValue(ctx, ret);
4080840810
ret = arr;
4080940811
}

0 commit comments

Comments
 (0)