mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 20:13:38 +00:00
jscript: Fix use after free in Object_defineProperty().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0dab1e414a
commit
a439f7202a
|
@ -470,11 +470,15 @@ static HRESULT Object_defineProperty(script_ctx_t *ctx, vdisp_t *jsthis, WORD fl
|
|||
}else {
|
||||
hres = JS_E_OBJECT_EXPECTED;
|
||||
}
|
||||
jsstr_release(name_str);
|
||||
|
||||
if(FAILED(hres))
|
||||
{
|
||||
jsstr_release(name_str);
|
||||
return hres;
|
||||
}
|
||||
|
||||
hres = jsdisp_define_property(obj, name, &prop_desc);
|
||||
jsstr_release(name_str);
|
||||
release_property_descriptor(&prop_desc);
|
||||
if(SUCCEEDED(hres) && r)
|
||||
*r = jsval_obj(jsdisp_addref(obj));
|
||||
|
|
Loading…
Reference in a new issue