mirror of
https://github.com/bellard/quickjs.git
synced 2026-04-05 06:28:00 +00:00
removed memory leak in string padding (issue #274)
This commit is contained in:
parent
d20ffec831
commit
e8cfe8fede
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user