Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/msxml3/domdoc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index 445caaee69..76d3fdb601 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -2292,8 +2292,8 @@ static HRESULT WINAPI domdoc_load(
if ( filename ) { + IUri *uri = NULL; IMoniker *mon; - IUri *uri;
if (This->properties->uri) { @@ -2310,15 +2310,19 @@ static HRESULT WINAPI domdoc_load( IMoniker_Release(mon); }
- if ( FAILED(hr) ) - This->error = E_FAIL; - else + if (SUCCEEDED(hr)) { get_doc(This)->name = (char *)xmlchar_from_wcharn(filename, -1, TRUE); This->properties->uri = uri; hr = This->error = S_OK; *isSuccessful = VARIANT_TRUE; } + else + { + if (uri) + IUri_Release(uri); + This->error = E_FAIL; + } }
if(!filename || FAILED(hr)) {