mirror of
https://github.com/bellard/quickjs.git
synced 2025-05-15 18:52:00 +08: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) {
|
if (n > JS_STRING_LEN_MAX) {
|
||||||
JS_ThrowRangeError(ctx, "invalid string length");
|
JS_ThrowRangeError(ctx, "invalid string length");
|
||||||
goto fail2;
|
goto fail3;
|
||||||
}
|
}
|
||||||
if (string_buffer_init(ctx, b, n))
|
if (string_buffer_init(ctx, b, n))
|
||||||
goto fail3;
|
goto fail3;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user