mirror of
https://github.com/mii443/qemu.git
synced 2025-08-27 01:19:30 +00:00
Introduce VLANClientState::cleanup() (Mark McLoughlin)
We're currently leaking memory and file descriptors on device hot-unplug. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/branches/stable_0_10@7160 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
@ -815,6 +815,13 @@ void virtio_load(VirtIODevice *vdev, QEMUFile *f)
|
||||
virtio_update_irq(vdev);
|
||||
}
|
||||
|
||||
void virtio_cleanup(VirtIODevice *vdev)
|
||||
{
|
||||
if (vdev->config)
|
||||
qemu_free(vdev->config);
|
||||
qemu_free(vdev->vq);
|
||||
}
|
||||
|
||||
VirtIODevice *virtio_init_pci(PCIBus *bus, const char *name,
|
||||
uint16_t vendor, uint16_t device,
|
||||
uint16_t subvendor, uint16_t subdevice,
|
||||
|
Reference in New Issue
Block a user