Commit 892d2e8c authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mshtml: Fix some IUri leaks (Valgrind).

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