]> git.proxmox.com Git - qemu.git/commitdiff
shpc: unparent device before free
authorMichael S. Tsirkin <mst@redhat.com>
Mon, 4 Jun 2012 14:29:54 +0000 (17:29 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 7 Jun 2012 14:18:58 +0000 (17:18 +0300)
Recent core change removed unparent
so we need to do this in all callers now.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/shpc.c

index a5baf246f178de481fa87a6fa2524f11738fc90e..6b9884d544ebc8682afa4a4801c2868d59c9e341 100644 (file)
--- a/hw/shpc.c
+++ b/hw/shpc.c
@@ -253,6 +253,7 @@ static void shpc_free_devices_in_slot(SHPCDevice *shpc, int slot)
          ++devfn) {
         PCIDevice *affected_dev = shpc->sec_bus->devices[devfn];
         if (affected_dev) {
+            object_unparent(OBJECT(affected_dev));
             qdev_free(&affected_dev->qdev);
         }
     }