aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/i386/acpi-build.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 4944249b84..74586f346f 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -859,6 +859,9 @@ static void build_pci_bus_end(PCIBus *bus, void *bus_state)
* to make acpi tables compatible with legacy machine types.
*/
if (!child->pcihp_bridge_en && bus->parent_dev) {
+ build_free_array(bus_table);
+ build_pci_bus_state_cleanup(child);
+ g_free(child);
return;
}