msacm32: Replace malloc/free with HeapAlloc/HeapFree.

This commit is contained in:
Michael Stefaniuc 2007-06-26 01:05:19 +02:00 committed by Alexandre Julliard
parent 98e3006903
commit da1f67a30d

View file

@ -301,9 +301,8 @@ static BOOL CALLBACK DriverEnumProc(HACMDRIVERID hadid,
if (dwSize < sizeof(WAVEFORMATEX)) if (dwSize < sizeof(WAVEFORMATEX))
dwSize = sizeof(WAVEFORMATEX); dwSize = sizeof(WAVEFORMATEX);
pwfx = (WAVEFORMATEX *) malloc(dwSize); pwfx = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dwSize);
ZeroMemory(pwfx, dwSize);
pwfx->cbSize = LOWORD(dwSize) - sizeof(WAVEFORMATEX); pwfx->cbSize = LOWORD(dwSize) - sizeof(WAVEFORMATEX);
pwfx->wFormatTag = WAVE_FORMAT_UNKNOWN; pwfx->wFormatTag = WAVE_FORMAT_UNKNOWN;
@ -352,7 +351,7 @@ static BOOL CALLBACK DriverEnumProc(HACMDRIVERID hadid,
"acmFormatTagEnum(): rc = %08x, should be %08x\n", "acmFormatTagEnum(): rc = %08x, should be %08x\n",
rc, MMSYSERR_NOERROR); rc, MMSYSERR_NOERROR);
free(pwfx); HeapFree(GetProcessHeap(), 0, pwfx);
/* try invalid handle */ /* try invalid handle */
rc = acmDriverClose((HACMDRIVER)1, 0); rc = acmDriverClose((HACMDRIVER)1, 0);