diff options
-rw-r--r-- | hw/pci/shpc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/pci/shpc.c b/hw/pci/shpc.c index 9a39060933..27c496e8c3 100644 --- a/hw/pci/shpc.c +++ b/hw/pci/shpc.c @@ -663,6 +663,7 @@ void shpc_cleanup(PCIDevice *d, MemoryRegion *bar) SHPCDevice *shpc = d->shpc; d->cap_present &= ~QEMU_PCI_CAP_SHPC; memory_region_del_subregion(bar, &shpc->mmio); + object_unparent(OBJECT(&shpc->mmio)); /* TODO: cleanup config space changes? */ g_free(shpc->config); g_free(shpc->cmask); |