From: Fabrice Bellard Date: Thu, 11 Dec 2025 18:18:56 +0000 (+0100) Subject: removed use after free in js_create_module_bytecode_function() (#467) X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/NGINX-js-1660x332.png%20%22NGINX%20JavaScript%20Banner%22?a=commitdiff_plain;h=1dbba8a88eaa40d15a8a9b70bb1a0b8fb5b552e6;p=quickjs.git removed use after free in js_create_module_bytecode_function() (#467) --- diff --git a/quickjs.c b/quickjs.c index af1bddf..3e88d7b 100644 --- a/quickjs.c +++ b/quickjs.c @@ -29957,6 +29957,7 @@ static int js_create_module_bytecode_function(JSContext *ctx, JSModuleDef *m) if (JS_IsException(func_obj)) return -1; + m->func_obj = func_obj; b = JS_VALUE_GET_PTR(bfunc); func_obj = js_closure2(ctx, func_obj, b, NULL, NULL, TRUE, m); if (JS_IsException(func_obj)) { @@ -29964,7 +29965,6 @@ static int js_create_module_bytecode_function(JSContext *ctx, JSModuleDef *m) JS_FreeValue(ctx, func_obj); return -1; } - m->func_obj = func_obj; return 0; }