diff --git a/dlls/windowscodecs/tests/pngformat.c b/dlls/windowscodecs/tests/pngformat.c index d08a5fb6188..8c33d3b9645 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; }