From cff54408e63c823f9eb9faf2f9738fe50dddf92c Mon Sep 17 00:00:00 2001 From: Dmitry Volyntsev Date: Thu, 16 May 2024 19:01:49 -0700 Subject: [PATCH] Fix `js_string_pad()` mem leak Fixes #274 --- quickjs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickjs.c b/quickjs.c index f000ff7..c1479fa 100644 --- a/quickjs.c +++ b/quickjs.c @@ -42457,7 +42457,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;