Don't leak VLANClientState on PCI hot remove
commitae50b2747f77944faa79eb914272b54eb30b63b3
authorMark McLoughlin <markmc@redhat.com>
Wed, 1 Jul 2009 15:46:38 +0000 (1 16:46 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 9 Jul 2009 21:58:07 +0000 (9 16:58 -0500)
tree836a0fb70b51d1ca20f11afcae2a91f5c5ca637d
parentd026fb6dab9483869897d9d762311db8895ecca5
Don't leak VLANClientState on PCI hot remove

destroy_nic() requires that NICInfo::private by a PCIDevice pointer,
but then goes on to require that the same pointer matches
VLANClientState::opaque.

That is no longer the case for virtio-net since qdev and wasn't
previously the case for rtl8139, ne2k_pci or eepro100.

Make the situation a lot more clear by maintaining a VLANClientState
pointer in NICInfo.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/device-hotplug.c
hw/dp8393x.c
hw/etraxfs_eth.c
hw/mcf_fec.c
hw/mipsnet.c
hw/ne2000.c
hw/qdev.c
hw/usb-net.c
net.h