aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2012-06-04 17:29:54 +0300
committerMichael S. Tsirkin <mst@redhat.com>2012-06-07 17:18:58 +0300
commite9adf2605da1827b223807b4a2efafe97d7568e6 (patch)
tree99c5da37fbb6035218f7ab4189545023b8f8ec5f
parent8cc9b43f7c5f826b39af4b012ad89bb55faac29c (diff)
shpc: unparent device before free
Recent core change removed unparent so we need to do this in all callers now. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r--hw/shpc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/shpc.c b/hw/shpc.c
index a5baf246f1..6b9884d544 100644
--- 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);
}
}