From 941d74a20ae941a5625983c57ad3c2c9e563721f Mon Sep 17 00:00:00 2001 From: Andrey Gusev Date: Fri, 19 Jan 2018 13:11:04 +0200 Subject: [PATCH] winmm/tests: Fix memory leak. Signed-off-by: Andrey Gusev Signed-off-by: Andrew Eikum Signed-off-by: Alexandre Julliard --- 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 a8a5e8d1995..2a127526aee 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,