Commit e748ead5 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

jscript: Use jsstr_empty instead of allocating empty string.

parent 1c13f0e6
......@@ -396,13 +396,11 @@ static HRESULT JSON_parse(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned
if(SUCCEEDED(hres)) {
struct transform_json_object_ctx proc_ctx = { ctx, get_object(argv[1]), S_OK };
if(!(str = jsstr_alloc(L"")))
hres = E_OUTOFMEMORY;
else {
ret = transform_json_object(&proc_ctx, root, str);
jsstr_release(str);
hres = proc_ctx.hres;
}
str = jsstr_empty();
ret = transform_json_object(&proc_ctx, root, str);
jsstr_release(str);
hres = proc_ctx.hres;
}
jsdisp_release(root);
if(FAILED(hres))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment