[PATCH] dsound: HeapFree secondaries (Coverity)

Marcus Meissner marcus at jet.franken.de
Fri Oct 26 17:39:26 CDT 2012


CID713448

ciao, marcus
---
 dlls/dsound/tests/dsound.c  |    1 +
 dlls/dsound/tests/dsound8.c |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/dsound/tests/dsound.c b/dlls/dsound/tests/dsound.c
index ad17d54..0f199a4 100644
--- a/dlls/dsound/tests/dsound.c
+++ b/dlls/dsound/tests/dsound.c
@@ -1562,6 +1562,7 @@ static void test_hw_buffers(void)
     for(i = 0; i < caps.dwMaxHwMixingAllBuffers; ++i)
         if(secondaries[i])
             IDirectSoundBuffer_Release(secondaries[i]);
+    HeapFree(GetProcessHeap(), 0, secondaries);
 
     IDirectSoundBuffer_Release(primary);
     IDirectSound_Release(ds);
diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c
index ba04d9f..a0b78e5 100644
--- a/dlls/dsound/tests/dsound8.c
+++ b/dlls/dsound/tests/dsound8.c
@@ -1049,6 +1049,8 @@ static void test_hw_buffers(void)
         if(secondaries[i])
             IDirectSoundBuffer_Release(secondaries[i]);
 
+    HeapFree(GetProcessHeap(), 0, secondaries);
+
     IDirectSoundBuffer_Release(primary);
     IDirectSound8_Release(ds);
 }
-- 
1.7.3.4




More information about the wine-patches mailing list