Andrey Gusev : winmm/tests: Fix memory leak.
Alexandre Julliard
julliard at winehq.org
Fri Jan 19 15:43:21 CST 2018
Module: wine
Branch: master
Commit: 941d74a20ae941a5625983c57ad3c2c9e563721f
URL: https://source.winehq.org/git/wine.git/?a=commit;h=941d74a20ae941a5625983c57ad3c2c9e563721f
Author: Andrey Gusev <andrey.goosev at gmail.com>
Date: Fri Jan 19 13:11:04 2018 +0200
winmm/tests: Fix memory leak.
Signed-off-by: Andrey Gusev <andrey.goosev at gmail.com>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winmm/tests/wave.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/winmm/tests/wave.c b/dlls/winmm/tests/wave.c
index a8a5e8d..2a12752 100644
--- a/dlls/winmm/tests/wave.c
+++ b/dlls/winmm/tests/wave.c
@@ -977,7 +977,10 @@ static void wave_out_test_device(UINT_PTR device)
"waveOutGetDevCapsA(%s): MMSYSERR_NOERROR expected, got %s\n",
dev_name(device),wave_out_error(rc));
if (rc!=MMSYSERR_NOERROR)
+ {
+ HeapFree(GetProcessHeap(), 0, nameA);
return;
+ }
trace(" %s: \"%s\" (%s) %d.%d (%d:%d)\n",dev_name(device),capsA.szPname,
(nameA?nameA:"failed"),capsA.vDriverVersion >> 8,
More information about the wine-cvs
mailing list