USER: use Heap functions instead of malloc/free
Mike McCormack
mike at codeweavers.com
Mon Aug 30 02:19:59 CDT 2004
ChangeLog:
* use Heap functions instead of malloc/free
-------------- next part --------------
Index: dlls/user/comm16.c
===================================================================
RCS file: /home/wine/wine/dlls/user/comm16.c,v
retrieving revision 1.20
diff -u -r1.20 comm16.c
--- dlls/user/comm16.c 7 Apr 2004 03:59:41 -0000 1.20
+++ dlls/user/comm16.c 30 Aug 2004 05:52:19 -0000
@@ -490,11 +490,11 @@
COM[port].obuf_size = cbOutQueue;
COM[port].obuf_head = COM[port].obuf_tail = 0;
- COM[port].inbuf = malloc(cbInQueue);
+ COM[port].inbuf = HeapAlloc(GetProcessHeap(), 0, cbInQueue);
if (COM[port].inbuf) {
- COM[port].outbuf = malloc(cbOutQueue);
+ COM[port].outbuf = HeapAlloc( GetProcessHeap(), 0, cbOutQueue);
if (!COM[port].outbuf)
- free(COM[port].inbuf);
+ HeapFree( GetProcessHeap(), 0, COM[port].inbuf);
} else COM[port].outbuf = NULL;
if (!COM[port].outbuf) {
/* not enough memory */
@@ -551,8 +551,8 @@
CancelIo(ptr->handle);
/* free buffers */
- free(ptr->outbuf);
- free(ptr->inbuf);
+ HeapFree( GetProcessHeap(), 0, ptr->outbuf);
+ HeapFree( GetProcessHeap(), 0, ptr->inbuf);
/* reset modem lines */
SetCommState16(&COM[cid].dcb);
More information about the wine-patches
mailing list