mshtml: Fix some IUri leaks (Valgrind).

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 10:44:37 +03:00 committed by Alexandre Julliard
parent 15a07c0725
commit 892d2e8c29
1 changed files with 5 additions and 1 deletions

View File

@ -1056,12 +1056,15 @@ HRESULT load_script(HTMLScriptElement *script_elem, const WCHAR *src, BOOL async
return hres;
hres = CreateURLMonikerEx2(NULL, uri, &mon, URL_MK_UNIFORM);
if(FAILED(hres))
if(FAILED(hres)) {
IUri_Release(uri);
return hres;
}
bsc = heap_alloc_zero(sizeof(*bsc));
if(!bsc) {
IMoniker_Release(mon);
IUri_Release(uri);
return E_OUTOFMEMORY;
}
@ -1069,6 +1072,7 @@ HRESULT load_script(HTMLScriptElement *script_elem, const WCHAR *src, BOOL async
IMoniker_Release(mon);
hres = IUri_GetScheme(uri, &bsc->scheme);
IUri_Release(uri);
if(FAILED(hres))
bsc->scheme = URL_SCHEME_UNKNOWN;