Archived
10
0
Fork 0

virtio-net: don't use vdev after virtio_cleanup

virtio_cleanup() will be changed by the following patch to remove the
VirtIONet struct that gets allocated via virtio_common_init().  Ensure
we don't dereference the structure after calling the cleanup function.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Amit Shah 2011-07-27 14:00:31 +05:30 committed by Michael S. Tsirkin
parent d92551f28e
commit b52dfd71f3

View file

@ -1073,6 +1073,6 @@ void virtio_net_exit(VirtIODevice *vdev)
qemu_bh_delete(n->tx_bh);
}
virtio_cleanup(&n->vdev);
qemu_del_vlan_client(&n->nic->nc);
virtio_cleanup(&n->vdev);
}