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>
This commit is contained in:
parent
8cc9b43f7c
commit
e9adf2605d
|
@ -253,6 +253,7 @@ static void shpc_free_devices_in_slot(SHPCDevice *shpc, int slot)
|
||||||
++devfn) {
|
++devfn) {
|
||||||
PCIDevice *affected_dev = shpc->sec_bus->devices[devfn];
|
PCIDevice *affected_dev = shpc->sec_bus->devices[devfn];
|
||||||
if (affected_dev) {
|
if (affected_dev) {
|
||||||
|
object_unparent(OBJECT(affected_dev));
|
||||||
qdev_free(&affected_dev->qdev);
|
qdev_free(&affected_dev->qdev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue