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 /hw/virtio-net.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 'hw/virtio-net.c')
-rw-r--r-- | hw/virtio-net.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/virtio-net.c b/hw/virtio-net.c index 3f10391f3e..8c2f460147 100644 --- a/hw/virtio-net.c +++ b/hw/virtio-net.c @@ -1039,9 +1039,9 @@ VirtIODevice *virtio_net_init(DeviceState *dev, NICConf *conf, n->mergeable_rx_bufs = 0; n->promisc = 1; /* for compatibility */ - n->mac_table.macs = qemu_mallocz(MAC_TABLE_ENTRIES * ETH_ALEN); + n->mac_table.macs = g_malloc0(MAC_TABLE_ENTRIES * ETH_ALEN); - n->vlans = qemu_mallocz(MAX_VLAN >> 3); + n->vlans = g_malloc0(MAX_VLAN >> 3); n->qdev = dev; register_savevm(dev, "virtio-net", -1, VIRTIO_NET_VM_VERSION, @@ -1063,8 +1063,8 @@ void virtio_net_exit(VirtIODevice *vdev) unregister_savevm(n->qdev, "virtio-net", n); - qemu_free(n->mac_table.macs); - qemu_free(n->vlans); + g_free(n->mac_table.macs); + g_free(n->vlans); if (n->tx_timer) { qemu_del_timer(n->tx_timer); |