From patchwork Sun Nov 15 18:18:20 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [8/8] Fix qemu_malloc/qemu_free use in rtl8139.c Date: Sun, 15 Nov 2009 08:18:20 -0000 From: Jean-Christophe DUBOIS X-Patchwork-Id: 38467 Message-Id: <1258309100-29591-8-git-send-email-jcd@tribudubois.net> To: qemu-devel@nongnu.org Cc: Jean-Christophe DUBOIS rtl8139.c is using malloc()/free() instead of qemu_malloc()/qemu_free(). Fix it. Signed-off-by: Jean-Christophe DUBOIS --- hw/rtl8139.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/rtl8139.c b/hw/rtl8139.c index c166db0..be47f61 100644 --- a/hw/rtl8139.c +++ b/hw/rtl8139.c @@ -1985,7 +1985,7 @@ static int rtl8139_cplus_transmit_one(RTL8139State *s) if (!s->cplus_txbuffer) { s->cplus_txbuffer_len = CP_TX_BUFFER_SIZE; - s->cplus_txbuffer = malloc(s->cplus_txbuffer_len); + s->cplus_txbuffer = qemu_malloc(s->cplus_txbuffer_len); s->cplus_txbuffer_offset = 0; DEBUG_PRINT(("RTL8139: +++ C+ mode transmission buffer allocated space %d\n", s->cplus_txbuffer_len)); @@ -2300,7 +2300,7 @@ static int rtl8139_cplus_transmit_one(RTL8139State *s) } else { - free(saved_buffer); + qemu_free(saved_buffer); } } else