mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 06:10:39 +00:00
jscript: Use jsstr_empty instead of allocating empty string.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
parent
1c13f0e694
commit
e748ead5cf
|
@ -396,13 +396,11 @@ static HRESULT JSON_parse(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned
|
||||||
|
|
||||||
if(SUCCEEDED(hres)) {
|
if(SUCCEEDED(hres)) {
|
||||||
struct transform_json_object_ctx proc_ctx = { ctx, get_object(argv[1]), S_OK };
|
struct transform_json_object_ctx proc_ctx = { ctx, get_object(argv[1]), S_OK };
|
||||||
if(!(str = jsstr_alloc(L"")))
|
|
||||||
hres = E_OUTOFMEMORY;
|
str = jsstr_empty();
|
||||||
else {
|
ret = transform_json_object(&proc_ctx, root, str);
|
||||||
ret = transform_json_object(&proc_ctx, root, str);
|
jsstr_release(str);
|
||||||
jsstr_release(str);
|
hres = proc_ctx.hres;
|
||||||
hres = proc_ctx.hres;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
jsdisp_release(root);
|
jsdisp_release(root);
|
||||||
if(FAILED(hres))
|
if(FAILED(hres))
|
||||||
|
|
Loading…
Reference in a new issue