aboutsummaryrefslogtreecommitdiff
path: root/hw/xen_nic.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/xen_nic.c
parent14015304b662e8f8ccce46c5a6927af6a14c510b (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 'hw/xen_nic.c')
-rw-r--r--hw/xen_nic.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/xen_nic.c b/hw/xen_nic.c
index ff86491cfa..b28b15670b 100644
--- a/hw/xen_nic.c
+++ b/hw/xen_nic.c
@@ -183,7 +183,7 @@ static void net_tx_packets(struct XenNetDev *netdev)
if (txreq.flags & NETTXF_csum_blank) {
/* have read-only mapping -> can't fill checksum in-place */
if (!tmpbuf) {
- tmpbuf = qemu_malloc(XC_PAGE_SIZE);
+ tmpbuf = g_malloc(XC_PAGE_SIZE);
}
memcpy(tmpbuf, page + txreq.offset, txreq.size);
net_checksum_calculate(tmpbuf, txreq.size);
@@ -199,7 +199,7 @@ static void net_tx_packets(struct XenNetDev *netdev)
}
netdev->tx_work = 0;
}
- qemu_free(tmpbuf);
+ g_free(tmpbuf);
}
/* ------------------------------------------------------------- */
@@ -423,7 +423,7 @@ static int net_free(struct XenDevice *xendev)
{
struct XenNetDev *netdev = container_of(xendev, struct XenNetDev, xendev);
- qemu_free(netdev->mac);
+ g_free(netdev->mac);
return 0;
}