winmm/tests: Fix memory leak.

Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Andrey Gusev 2018-01-19 13:11:04 +02:00 committed by Alexandre Julliard
parent 0e9cb10340
commit 941d74a20a
1 changed files with 3 additions and 0 deletions

View File

@ -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,