[PATCH] windowscodecs/tests: Fix a memory leak (Valgrind).
Signed-off-by: Sven Baars <sven.wine(a)gmail.com> --- 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 d08a5fb618..8c33d3b964 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; } -- 2.17.1
Signed-off-by: Sven Baars <sven.wine(a)gmail.com> --- dlls/windowscodecs/imgfactory.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/windowscodecs/imgfactory.c b/dlls/windowscodecs/imgfactory.c index fb235fbbe1..40f3ed52d8 100644 --- a/dlls/windowscodecs/imgfactory.c +++ b/dlls/windowscodecs/imgfactory.c @@ -185,6 +185,7 @@ static HRESULT find_decoder(IStream *pIStream, const GUID *pguidVendor, IWICBitmapDecoder_Release(*decoder); IWICBitmapDecoderInfo_Release(decoderinfo); IUnknown_Release(unkdecoderinfo); + IEnumUnknown_Release(enumdecoders); *decoder = NULL; return res; } -- 2.17.1
participants (1)
-
Sven Baars