Commit dba0fe36 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

vbscript: Fix potential crash if script site creation failed.

parent ab854893
......@@ -209,11 +209,12 @@ static HRESULT set_object_site(script_ctx_t *ctx, IUnknown *obj)
return S_OK;
ax_site = create_ax_site(ctx);
if(ax_site)
if(ax_site) {
hres = IObjectWithSite_SetSite(obj_site, ax_site);
IUnknown_Release(ax_site);
}
else
hres = E_OUTOFMEMORY;
IUnknown_Release(ax_site);
IObjectWithSite_Release(obj_site);
return 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