aboutsummaryrefslogtreecommitdiff
path: root/hw/usb-net.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-08-20 22:09:37 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-08-20 23:01:08 -0500
commit7267c0947d7e8ae5dff7bafd932c3bc285f43e5c (patch)
tree9aa05d6e05ed83e67bf014f6745a3081b8407dc5 /hw/usb-net.c
parent14015304b662e8f8ccce46c5a6927af6a14c510b (diff)
downloadqemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.zip
qemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.tar.gz
qemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.tar.bz2
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/usb-net.c')
-rw-r--r--hw/usb-net.c6
1 files changed, 3 insertions, 3 deletions
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);
}
}