From 9386cb222826142b288a33eadb49c03814f7caab Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Mon, 30 Aug 2004 18:40:47 +0000 Subject: [PATCH] Use Heap functions instead of malloc/free. --- dlls/user/comm16.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/user/comm16.c b/dlls/user/comm16.c index e8b9a9d72b3..c1f743c4a82 100644 --- a/dlls/user/comm16.c +++ b/dlls/user/comm16.c @@ -490,11 +490,11 @@ INT16 WINAPI OpenComm16(LPCSTR device,UINT16 cbInQueue,UINT16 cbOutQueue) 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 @@ INT16 WINAPI CloseComm16(INT16 cid) 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);