Michael Stefaniuc : dmime/tests: Destroy the performance on an error path (Valgrind).

Alexandre Julliard julliard at winehq.org
Mon Jan 6 15:38:01 CST 2020


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

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Mon Jan  6 20:29:44 2020 +0100

dmime/tests: Destroy the performance on an error path (Valgrind).

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36272
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dmime/tests/performance.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlls/dmime/tests/performance.c b/dlls/dmime/tests/performance.c
index 4c340252aa..e6a3fe2271 100644
--- a/dlls/dmime/tests/performance.c
+++ b/dlls/dmime/tests/performance.c
@@ -96,8 +96,10 @@ static HRESULT test_InitAudio(void)
     dsound = NULL;
     hr = IDirectMusicPerformance8_InitAudio(performance, NULL, &dsound, NULL,
             DMUS_APATH_SHARED_STEREOPLUSREVERB, 128, DMUS_AUDIOF_ALL, NULL);
-    if(hr != S_OK)
+    if (hr != S_OK) {
+        IDirectMusicPerformance8_Release(performance);
         return hr;
+    }
 
     port = NULL;
     hr = IDirectMusicPerformance8_PChannelInfo(performance, 128, &port, NULL, NULL);




More information about the wine-cvs mailing list