From: Fabrice Bellard Date: Sat, 21 Mar 2026 13:26:00 +0000 (+0100) Subject: Fix memory leak in Iterator.prototype.map (saghul) (#493) X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/static/gitweb.js?a=commitdiff_plain;h=f1b63fc1ad0b62262c069b2e1615737b2bb63631;p=quickjs.git Fix memory leak in Iterator.prototype.map (saghul) (#493) --- diff --git a/quickjs.c b/quickjs.c index f6104bb..f6ff4a8 100644 --- a/quickjs.c +++ b/quickjs.c @@ -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;