msxml3: Fix a memory leak (Valgrind).

Signed-off-by: Yongjie Yao <yaoyongjie@uniontech.com>
Signed-off-by: Myah Caron <qsniyg@protonmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Yongjie Yao 2020-09-11 15:41:58 +00:00 committed by Alexandre Julliard
parent db1403c5de
commit 9336ec8faf
1 changed files with 4 additions and 0 deletions

View File

@ -797,13 +797,17 @@ static HRESULT domdoc_load_from_stream(domdoc *doc, ISequentialStream *stream)
hr = GetHGlobalFromStream(hstream, &hglobal);
if (FAILED(hr))
{
IStream_Release(hstream);
return hr;
}
len = GlobalSize(hglobal);
ptr = GlobalLock(hglobal);
if (len)
xmldoc = doparse(doc, ptr, len, XML_CHAR_ENCODING_NONE);
GlobalUnlock(hglobal);
IStream_Release(hstream);
if (!xmldoc)
{