acpi-build: fix memory leak with bridge hp off
When bridge hotplug is disabled for old machine types, we never free memory allocated for temporary tables. Fix this up. Cc: qemu-stable@nongnu.org Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
11d39a1310
commit
16771613a8
@ -859,6 +859,9 @@ static void build_pci_bus_end(PCIBus *bus, void *bus_state)
|
|||||||
* to make acpi tables compatible with legacy machine types.
|
* to make acpi tables compatible with legacy machine types.
|
||||||
*/
|
*/
|
||||||
if (!child->pcihp_bridge_en && bus->parent_dev) {
|
if (!child->pcihp_bridge_en && bus->parent_dev) {
|
||||||
|
build_free_array(bus_table);
|
||||||
|
build_pci_bus_state_cleanup(child);
|
||||||
|
g_free(child);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user