Commit 9336ec8f authored by Yongjie Yao's avatar Yongjie Yao Committed by Alexandre Julliard

msxml3: Fix a memory leak (Valgrind).

parent db1403c5
...@@ -797,13 +797,17 @@ static HRESULT domdoc_load_from_stream(domdoc *doc, ISequentialStream *stream) ...@@ -797,13 +797,17 @@ static HRESULT domdoc_load_from_stream(domdoc *doc, ISequentialStream *stream)
hr = GetHGlobalFromStream(hstream, &hglobal); hr = GetHGlobalFromStream(hstream, &hglobal);
if (FAILED(hr)) if (FAILED(hr))
{
IStream_Release(hstream);
return hr; return hr;
}
len = GlobalSize(hglobal); len = GlobalSize(hglobal);
ptr = GlobalLock(hglobal); ptr = GlobalLock(hglobal);
if (len) if (len)
xmldoc = doparse(doc, ptr, len, XML_CHAR_ENCODING_NONE); xmldoc = doparse(doc, ptr, len, XML_CHAR_ENCODING_NONE);
GlobalUnlock(hglobal); GlobalUnlock(hglobal);
IStream_Release(hstream);
if (!xmldoc) if (!xmldoc)
{ {
......
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