diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-20 22:09:37 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-20 23:01:08 -0500 |
commit | 7267c0947d7e8ae5dff7bafd932c3bc285f43e5c (patch) | |
tree | 9aa05d6e05ed83e67bf014f6745a3081b8407dc5 /usb-redir.c | |
parent | 14015304b662e8f8ccce46c5a6927af6a14c510b (diff) |
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 'usb-redir.c')
-rw-r--r-- | usb-redir.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usb-redir.c b/usb-redir.c index 9e5fce21ea..3fbbcfff97 100644 --- a/usb-redir.c +++ b/usb-redir.c @@ -234,7 +234,7 @@ static int usbredir_write(void *priv, uint8_t *data, int count) static AsyncURB *async_alloc(USBRedirDevice *dev, USBPacket *p) { - AsyncURB *aurb = (AsyncURB *) qemu_mallocz(sizeof(AsyncURB)); + AsyncURB *aurb = (AsyncURB *) g_malloc0(sizeof(AsyncURB)); aurb->dev = dev; aurb->packet = p; aurb->packet_id = dev->packet_id; @@ -247,7 +247,7 @@ static AsyncURB *async_alloc(USBRedirDevice *dev, USBPacket *p) static void async_free(USBRedirDevice *dev, AsyncURB *aurb) { QTAILQ_REMOVE(&dev->asyncq, aurb, next); - qemu_free(aurb); + g_free(aurb); } static AsyncURB *async_find(USBRedirDevice *dev, uint32_t packet_id) @@ -286,7 +286,7 @@ static void usbredir_cancel_packet(USBDevice *udev, USBPacket *p) static struct buf_packet *bufp_alloc(USBRedirDevice *dev, uint8_t *data, int len, int status, uint8_t ep) { - struct buf_packet *bufp = qemu_malloc(sizeof(struct buf_packet)); + struct buf_packet *bufp = g_malloc(sizeof(struct buf_packet)); bufp->data = data; bufp->len = len; bufp->status = status; @@ -299,7 +299,7 @@ static void bufp_free(USBRedirDevice *dev, struct buf_packet *bufp, { QTAILQ_REMOVE(&dev->endpoint[EP2I(ep)].bufpq, bufp, next); free(bufp->data); - qemu_free(bufp); + g_free(bufp); } static void usbredir_free_bufpq(USBRedirDevice *dev, uint8_t ep) |