diff options
author | Amit Shah <amit.shah@redhat.com> | 2011-07-27 14:00:31 +0530 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2011-07-27 20:18:47 +0300 |
commit | b52dfd71f33b902e612b12f6cc89f3b61e4d3e22 (patch) | |
tree | 790f874c54444cee03ef851ebd2b7db83b72c9cf /hw/virtio-net.c | |
parent | d92551f28eff7cb6572ed3147399e51f5f5dfc22 (diff) |
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>
Diffstat (limited to 'hw/virtio-net.c')
-rw-r--r-- | hw/virtio-net.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/virtio-net.c b/hw/virtio-net.c index 6997e02dcf..09c665babe 100644 --- a/hw/virtio-net.c +++ b/hw/virtio-net.c @@ -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); } |