]> git.proxmox.com Git - qemu.git/blobdiff - hw/pci.c
pci: call object_unparent() before free_qdev()
[qemu.git] / hw / pci.c
index b706e6980a6184b389632b4da056166866b40081..c1ebdde91e9de22823bacf8ec8d96df4aceab678 100644 (file)
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -1527,7 +1527,6 @@ static int pci_unplug_device(DeviceState *qdev)
         qerror_report(QERR_DEVICE_NO_HOTPLUG, object_get_typename(OBJECT(dev)));
         return -1;
     }
-    object_unparent(OBJECT(dev));
     return dev->bus->hotplug(dev->bus->hotplug_qdev, dev,
                              PCI_HOTPLUG_DISABLED);
 }