From fa706d5622c857c5531b049bbd3e2723df8a4514 Mon Sep 17 00:00:00 2001 From: Fabrice Bellard Date: Mon, 7 Apr 2025 12:00:08 +0200 Subject: [PATCH] Fix leak in BigInt unary plus (saghul) --- quickjs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/quickjs.c b/quickjs.c index 6e18ec1..ae827ed 100644 --- a/quickjs.c +++ b/quickjs.c @@ -13397,6 +13397,7 @@ static no_inline __exception int js_unary_arith_slow(JSContext *ctx, switch(op) { case OP_plus: JS_ThrowTypeError(ctx, "bigint argument with unary +"); + JS_FreeValue(ctx, op1); goto exception; case OP_inc: case OP_dec: