@@ -56,7 +56,7 @@ typedef struct VirtIONet
uint8_t uni_overflow;
uint8_t *macs;
} mac_table;
- uint32_t *vlans;
+ uint32_t vlans[MAX_VLAN >> 5];
} VirtIONet;
/* TODO
@@ -846,8 +846,6 @@ VirtIODevice *virtio_net_init(DeviceState *dev, NICConf *conf)
n->mac_table.macs = qemu_mallocz(MAC_TABLE_ENTRIES * ETH_ALEN);
- n->vlans = qemu_mallocz(MAX_VLAN >> 3);
-
register_savevm("virtio-net", virtio_net_id++, VIRTIO_NET_VM_VERSION,
virtio_net_save, virtio_net_load, n);
@@ -863,7 +861,6 @@ void virtio_net_exit(VirtIODevice *vdev)
unregister_savevm("virtio-net", n);
qemu_free(n->mac_table.macs);
- qemu_free(n->vlans);
qemu_del_timer(n->tx_timer);
qemu_free_timer(n->tx_timer);
Signed-off-by: Juan Quintela <quintela@redhat.com> --- hw/virtio-net.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-)