virtio-net: don't use vdev after virtio_cleanup
authorAmit Shah <amit.shah@redhat.com>
Wed, 27 Jul 2011 08:30:31 +0000 (14:00 +0530)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 27 Jul 2011 17:18:47 +0000 (20:18 +0300)
commitb52dfd71f33b902e612b12f6cc89f3b61e4d3e22
tree790f874c54444cee03ef851ebd2b7db83b72c9cf
parentd92551f28eff7cb6572ed3147399e51f5f5dfc22
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>
hw/virtio-net.c