]> git.kaiwu.me - quickjs.git/commitdiff
Fix leak in BigInt unary plus (saghul)
authorFabrice Bellard <fabrice@bellard.org>
Mon, 7 Apr 2025 10:00:08 +0000 (12:00 +0200)
committerFabrice Bellard <fabrice@bellard.org>
Mon, 7 Apr 2025 10:00:08 +0000 (12:00 +0200)
quickjs.c

index 6e18ec168b782a82c35c43ac1b6c33a5c8ca75d7..ae827ed4abb03e1e0a95ce3d16a08a364159bafa 100644 (file)
--- 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: