aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/pci/pci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index e6b08e1..bd8043c 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -869,6 +869,8 @@ static void do_pci_unregister_device(PCIDevice *pci_dev)
pci_dev->bus->devices[pci_dev->devfn] = NULL;
pci_config_free(pci_dev);
+ memory_region_del_subregion(&pci_dev->bus_master_container_region,
+ &pci_dev->bus_master_enable_region);
address_space_destroy(&pci_dev->bus_master_as);
}