[PATCH 11/11] Release decoder after use

Nikolay Sivov bunglehead at gmail.com
Mon Dec 7 04:42:37 CST 2009


---
 dlls/windowscodecs/tests/bmpformat.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dlls/windowscodecs/tests/bmpformat.c b/dlls/windowscodecs/tests/bmpformat.c
index 1f114a2..4881669 100644
--- a/dlls/windowscodecs/tests/bmpformat.c
+++ b/dlls/windowscodecs/tests/bmpformat.c
@@ -225,6 +225,8 @@ static void test_decode_24bpp(void)
                 /* cannot querycapability twice */
                 hr = IWICBitmapDecoder_QueryCapability(decoder2, bmpstream, &capability);
                 ok(hr == WINCODEC_ERR_WRONGSTATE, "expected WINCODEC_ERR_WRONGSTATE, hr=%x\n", hr);
+
+                IWICBitmapDecoder_Release(decoder2);
             }
 
             IStream_Release(bmpstream);
@@ -373,6 +375,7 @@ static void test_decode_1bpp(void)
                 ok(hr == S_OK, "QueryCapability failed, hr=%x\n", hr);
                 ok(capability == (WICBitmapDecoderCapabilityCanDecodeAllImages),
                     "unexpected capabilities: %x\n", capability);
+                IWICBitmapDecoder_Release(decoder2);
             }
 
             IStream_Release(bmpstream);
@@ -531,6 +534,7 @@ static void test_decode_4bpp(void)
                 ok(hr == S_OK, "QueryCapability failed, hr=%x\n", hr);
                 ok(capability == (WICBitmapDecoderCapabilityCanDecodeAllImages),
                     "unexpected capabilities: %x\n", capability);
+                IWICBitmapDecoder_Release(decoder2);
             }
 
             IStream_Release(bmpstream);
@@ -710,6 +714,7 @@ static void test_decode_rle8(void)
                 ok(hr == S_OK, "QueryCapability failed, hr=%x\n", hr);
                 ok(capability == (WICBitmapDecoderCapabilityCanDecodeAllImages),
                     "unexpected capabilities: %x\n", capability);
+                IWICBitmapDecoder_Release(decoder2);
             }
 
             IStream_Release(bmpstream);
@@ -876,6 +881,7 @@ static void test_decode_rle4(void)
                 ok(hr == S_OK, "QueryCapability failed, hr=%x\n", hr);
                 ok(capability == (WICBitmapDecoderCapabilityCanDecodeAllImages),
                     "unexpected capabilities: %x\n", capability);
+                IWICBitmapDecoder_Release(decoder2);
             }
 
             IStream_Release(bmpstream);
-- 
1.5.6.5


--=-SUz8DORdnz5SX0F3xWyS--




More information about the wine-patches mailing list