mirror of
https://github.com/bellard/quickjs.git
synced 2026-03-31 12:18:01 +00:00
Fix memory leak in Iterator.prototype.map (saghul) (#493)
This commit is contained in:
parent
841dd034c2
commit
f1b63fc1ad
@ -43960,6 +43960,7 @@ static JSValue js_iterator_helper_next(JSContext *ctx, JSValueConst this_val,
|
||||
args[1] = index_val;
|
||||
ret = JS_Call(ctx, it->func, JS_UNDEFINED, countof(args), args);
|
||||
JS_FreeValue(ctx, index_val);
|
||||
JS_FreeValue(ctx, item);
|
||||
if (JS_IsException(ret))
|
||||
goto fail;
|
||||
goto done;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user