removed memory leak (#441)

This commit is contained in:
Fabrice Bellard 2025-09-18 10:42:13 +02:00
parent dc7af0ac42
commit de4d3927b8

View File

@ -40802,8 +40802,10 @@ done:
goto exception; goto exception;
args[0] = ret; args[0] = ret;
res = JS_Invoke(ctx, arr, JS_ATOM_set, 1, args); res = JS_Invoke(ctx, arr, JS_ATOM_set, 1, args);
if (check_exception_free(ctx, res)) if (check_exception_free(ctx, res)) {
JS_FreeValue(ctx, arr);
goto exception; goto exception;
}
JS_FreeValue(ctx, ret); JS_FreeValue(ctx, ret);
ret = arr; ret = arr;
} }