From: Michael S. Tsirkin Date: Mon, 4 Jun 2012 14:29:54 +0000 (+0300) Subject: shpc: unparent device before free X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e9adf2605da1827b223807b4a2efafe97d7568e6;p=qemu.git 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 --- 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); } }