Andrey Gusev : winmm/tests: Fix memory leak.
Module: wine Branch: master Commit: 941d74a20ae941a5625983c57ad3c2c9e563721f URL: https://source.winehq.org/git/wine.git/?a=commit;h=941d74a20ae941a5625983c57... Author: Andrey Gusev <andrey.goosev(a)gmail.com> Date: Fri Jan 19 13:11:04 2018 +0200 winmm/tests: Fix memory leak. Signed-off-by: Andrey Gusev <andrey.goosev(a)gmail.com> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)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,
participants (1)
-
Alexandre Julliard