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:
parent
d92551f28e
commit
b52dfd71f3
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Reference in a new issue