From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOCPo-0007EJ-2f for qemu-devel@nongnu.org; Wed, 18 Feb 2015 16:44:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOCPi-0002fk-V2 for qemu-devel@nongnu.org; Wed, 18 Feb 2015 16:44:15 -0500 Date: Wed, 18 Feb 2015 22:44:04 +0100 From: "Michael S. Tsirkin" Message-ID: <1424295164-4774-2-git-send-email-mst@redhat.com> References: <1424295164-4774-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1424295164-4774-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 01/96] acpi-build: fix memory leak with bridge hp off List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Juan Quintela , qemu-stable@nongnu.org, dgilbert@redhat.com, Anthony Liguori , Paolo Bonzini , 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 --- 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