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

jscript: Fix value leak in Array.shift.

parent 0a4b70a5
......@@ -527,8 +527,10 @@ static HRESULT Array_shift(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigne
hres = jsdisp_get_idx(jsthis, i, &v);
if(hres == DISP_E_UNKNOWNNAME)
hres = jsdisp_delete_idx(jsthis, i-1);
else if(SUCCEEDED(hres))
else if(SUCCEEDED(hres)) {
hres = jsdisp_propput_idx(jsthis, i-1, v);
jsval_release(v);
}
}
if(SUCCEEDED(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