Sven Baars : windowscodecs/tests: Fix a memory leak (Valgrind).

Alexandre Julliard julliard at winehq.org
Wed Dec 19 16:04:43 CST 2018


Module: wine
Branch: master
Commit: a77c7626dd0ebea1f7fa0bbbf2edbcd7a209bb10
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=a77c7626dd0ebea1f7fa0bbbf2edbcd7a209bb10

Author: Sven Baars <sven.wine at gmail.com>
Date:   Tue Dec 18 20:44:16 2018 +0100

windowscodecs/tests: Fix a memory leak (Valgrind).

Signed-off-by: Sven Baars <sven.wine at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/windowscodecs/tests/pngformat.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/windowscodecs/tests/pngformat.c b/dlls/windowscodecs/tests/pngformat.c
index d08a5fb..8c33d3b 100644
--- a/dlls/windowscodecs/tests/pngformat.c
+++ b/dlls/windowscodecs/tests/pngformat.c
@@ -306,6 +306,8 @@ static HRESULT create_decoder(const void *image_data, UINT image_size, IWICBitma
         refcount = IStream_Release(stream);
         ok(refcount > 0, "expected stream refcount > 0\n");
     }
+    else
+        IStream_Release(stream);
 
     return hr;
 }




More information about the wine-cvs mailing list