msacm32: Replace malloc/free with HeapAlloc/HeapFree.

Michael Stefaniuc mstefani at redhat.de
Mon Jun 25 18:05:19 CDT 2007


---
 dlls/msacm32/tests/msacm.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/dlls/msacm32/tests/msacm.c b/dlls/msacm32/tests/msacm.c
index c3b866c..6efcb84 100644
--- a/dlls/msacm32/tests/msacm.c
+++ b/dlls/msacm32/tests/msacm.c
@@ -301,9 +301,8 @@ static BOOL CALLBACK DriverEnumProc(HACMDRIVERID hadid,
             if (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->wFormatTag = WAVE_FORMAT_UNKNOWN;
 
@@ -352,7 +351,7 @@ static BOOL CALLBACK DriverEnumProc(HACMDRIVERID hadid,
                "acmFormatTagEnum(): rc = %08x, should be %08x\n",
                rc, MMSYSERR_NOERROR);
 
-            free(pwfx);
+            HeapFree(GetProcessHeap(), 0, pwfx);
 
             /* try invalid handle */
             rc = acmDriverClose((HACMDRIVER)1, 0);
-- 
1.5.0.6
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070626/779799da/attachment.pgp


More information about the wine-patches mailing list