diff options
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); |