Yongjie Yao : msxml3: Fix a memory leak (Valgrind).
Alexandre Julliard
julliard at winehq.org
Mon Sep 14 14:58:23 CDT 2020
Module: wine
Branch: master
Commit: 9336ec8faf2e2f2420698f40c02988877781bfef
URL: https://source.winehq.org/git/wine.git/?a=commit;h=9336ec8faf2e2f2420698f40c02988877781bfef
Author: Yongjie Yao <yaoyongjie at uniontech.com>
Date: Fri Sep 11 15:41:58 2020 +0000
msxml3: Fix a memory leak (Valgrind).
Signed-off-by: Yongjie Yao <yaoyongjie at uniontech.com>
Signed-off-by: Myah Caron <qsniyg at protonmail.com>
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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 8d45c546fb..d447bd2b1d 100644
--- a/dlls/msxml3/domdoc.c
+++ b/dlls/msxml3/domdoc.c
@@ -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)
{
More information about the wine-cvs
mailing list