mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 09:21:14 +00:00
msacm32: Replace malloc/free with HeapAlloc/HeapFree.
This commit is contained in:
parent
98e3006903
commit
da1f67a30d
1 changed files with 2 additions and 3 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue