summaryrefslogtreecommitdiff
path: root/quickjs.c
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2025-03-27 14:43:25 +0100
committerFabrice Bellard <fabrice@bellard.org>2025-03-27 14:43:25 +0100
commite8cfe8fede99abe00bf677cc3c9c1a9de273a125 (patch)
tree4637a17397641221e29723ba5ce2d571639c4530 /quickjs.c
parentd20ffec8315255353faad0081f88dd03a2a5d299 (diff)
downloadquickjs-e8cfe8fede99abe00bf677cc3c9c1a9de273a125.tar.gz
quickjs-e8cfe8fede99abe00bf677cc3c9c1a9de273a125.zip
removed memory leak in string padding (issue #274)
Diffstat (limited to 'quickjs.c')
-rw-r--r--quickjs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/quickjs.c b/quickjs.c
index 38687cf..946a743 100644
--- a/quickjs.c
+++ b/quickjs.c
@@ -41928,7 +41928,7 @@ static JSValue js_string_pad(JSContext *ctx, JSValueConst this_val,
}
if (n > JS_STRING_LEN_MAX) {
JS_ThrowRangeError(ctx, "invalid string length");
- goto fail2;
+ goto fail3;
}
if (string_buffer_init(ctx, b, n))
goto fail3;