ieframe: Fix moniker leak on error path.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Nikolay Sivov 2016-11-10 14:47:10 +03:00 committed by Alexandre Julliard
parent eaef858b7a
commit 477e7fdfc0
1 changed files with 4 additions and 1 deletions

View File

@ -703,13 +703,16 @@ static HRESULT bind_to_object(DocHost *This, IMoniker *mon, LPCWSTR url, IBindCt
hres = IMoniker_GetDisplayName(mon, 0, NULL, &display_name);
if(FAILED(hres)) {
FIXME("GetDisplayName failed: %08x\n", hres);
IMoniker_Release(mon);
return hres;
}
hres = set_dochost_url(This, display_name);
CoTaskMemFree(display_name);
if(FAILED(hres))
if(FAILED(hres)) {
IMoniker_Release(mon);
return hres;
}
IBindCtx_RegisterObjectParam(bindctx, (LPOLESTR)SZ_HTML_CLIENTSITE_OBJECTPARAM,
(IUnknown*)&This->IOleClientSite_iface);