mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 17:13:37 +00:00
msacm32: Replace malloc/free with HeapAlloc/HeapFree.
This commit is contained in:
parent
98e3006903
commit
da1f67a30d
|
@ -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