From 7267c0947d7e8ae5dff7bafd932c3bc285f43e5c Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Sat, 20 Aug 2011 22:09:37 -0500 Subject: Use glib memory allocation and free functions qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori --- hw/usb-net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'hw/usb-net.c') diff --git a/hw/usb-net.c b/hw/usb-net.c index 0cb47d6..a8b7c8d 100644 --- a/hw/usb-net.c +++ b/hw/usb-net.c @@ -844,7 +844,7 @@ static int rndis_get_response(USBNetState *s, uint8_t *buf) QTAILQ_REMOVE(&s->rndis_resp, r, entries); ret = r->length; memcpy(buf, r->buf, r->length); - qemu_free(r); + g_free(r); return ret; } @@ -852,7 +852,7 @@ static int rndis_get_response(USBNetState *s, uint8_t *buf) static void *rndis_queue_response(USBNetState *s, unsigned int length) { struct rndis_response *r = - qemu_mallocz(sizeof(struct rndis_response) + length); + g_malloc0(sizeof(struct rndis_response) + length); QTAILQ_INSERT_TAIL(&s->rndis_resp, r, entries); r->length = length; @@ -866,7 +866,7 @@ static void rndis_clear_responsequeue(USBNetState *s) while ((r = s->rndis_resp.tqh_first)) { QTAILQ_REMOVE(&s->rndis_resp, r, entries); - qemu_free(r); + g_free(r); } } -- cgit v1.1