qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] acpi-build: fix memory leak with bridge hp off
@ 2015-01-28 16:30 Michael S. Tsirkin
  2015-01-28 16:30 ` [Qemu-devel] [PATCH 2/2] acpi-build: skip hotplugged bridges Michael S. Tsirkin
  2015-01-30 13:35 ` [Qemu-devel] [PATCH 1/2] acpi-build: fix memory leak with bridge hp off Igor Mammedov
  0 siblings, 2 replies; 4+ messages in thread
From: Michael S. Tsirkin @ 2015-01-28 16:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, qemu-stable, Anthony Liguori, Richard Henderson

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>
---
 hw/i386/acpi-build.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 4944249..74586f3 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;
     }
 
-- 
MST

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-30 13:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-28 16:30 [Qemu-devel] [PATCH 1/2] acpi-build: fix memory leak with bridge hp off Michael S. Tsirkin
2015-01-28 16:30 ` [Qemu-devel] [PATCH 2/2] acpi-build: skip hotplugged bridges Michael S. Tsirkin
2015-01-29 11:13   ` Igor Mammedov
2015-01-30 13:35 ` [Qemu-devel] [PATCH 1/2] acpi-build: fix memory leak with bridge hp off Igor Mammedov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).