Yongjie Yao : msxml3: Fix a memory leak (Valgrind).
Module: wine Branch: oldstable Commit: ade6d16750692fcdcfee7f5851fbddb117851417 URL: https://source.winehq.org/git/wine.git/?a=commit;h=ade6d16750692fcdcfee7f585... Author: Yongjie Yao <yaoyongjie(a)uniontech.com> Date: Fri Sep 11 15:41:58 2020 +0000 msxml3: Fix a memory leak (Valgrind). Signed-off-by: Yongjie Yao <yaoyongjie(a)uniontech.com> Signed-off-by: Myah Caron <qsniyg(a)protonmail.com> Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 9336ec8faf2e2f2420698f40c02988877781bfef) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msxml3/domdoc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index 76d3fdb6018..3dc98279f43 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -796,13 +796,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) {
participants (1)
-
Alexandre Julliard