Andrew Talbot : winenas.drv: Replace malloc() with HeapAlloc().
Alexandre Julliard
julliard at winehq.org
Fri Feb 13 08:59:26 CST 2009
Module: wine
Branch: master
Commit: 0bd62fddfa7a24212b5ebe036eba48de388d6607
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0bd62fddfa7a24212b5ebe036eba48de388d6607
Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date: Thu Feb 12 19:47:15 2009 +0000
winenas.drv: Replace malloc() with HeapAlloc().
---
dlls/winenas.drv/audio.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/winenas.drv/audio.c b/dlls/winenas.drv/audio.c
index d26e57c..dfd2354 100644
--- a/dlls/winenas.drv/audio.c
+++ b/dlls/winenas.drv/audio.c
@@ -1382,11 +1382,11 @@ event_handler(AuServer* aud, AuEvent* ev, AuEventHandlerRec* hnd)
static void
buffer_resize(WINE_WAVEOUT* wwo, int len)
{
- void *newbuf = malloc(wwo->BufferUsed + len);
+ void *newbuf = HeapAlloc(GetProcessHeap(), 0, wwo->BufferUsed + len);
void *oldbuf = wwo->SoundBuffer;
memcpy(newbuf, oldbuf, wwo->BufferUsed);
wwo->SoundBuffer = newbuf;
- free(oldbuf);
+ HeapFree(GetProcessHeap(), 0, oldbuf);
}
static int nas_add_buffer(WINE_WAVEOUT* wwo) {
@@ -1417,9 +1417,9 @@ static int nas_send_buffer(WINE_WAVEOUT* wwo) {
ptr = wwo->SoundBuffer;
} else {
len = wwo->freeBytes;
- ptr = malloc(len);
+ ptr = HeapAlloc(GetProcessHeap(), 0, len);
memcpy(ptr,wwo->SoundBuffer,len);
- newdata = malloc(wwo->BufferUsed - len);
+ newdata = HeapAlloc(GetProcessHeap(), 0, wwo->BufferUsed - len);
memcpy(newdata, wwo->SoundBuffer + len, wwo->BufferUsed - len);
}
@@ -1431,7 +1431,7 @@ static int nas_send_buffer(WINE_WAVEOUT* wwo) {
wwo->freeBytes -= len;
wwo->writeBytes += len;
- free(ptr);
+ HeapFree(GetProcessHeap(), 0, ptr);
wwo->SoundBuffer = NULL;
More information about the wine-cvs
mailing list