[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] acpi-build: fix memory leak with bridge hp
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] acpi-build: fix memory leak with bridge hp off |
Date: |
Fri, 30 Jan 2015 14:35:50 +0100 |
On Wed, 28 Jan 2015 18:30:34 +0200
"Michael S. Tsirkin" <address@hidden> wrote:
> When bridge hotplug is disabled for old machine types,
> we never free memory allocated for temporary tables.
> Fix this up.
patch "pc: acpi-build: simplify PCI bus tree generation"
http://lists.gnu.org/archive/html/qemu-devel/2015-01/msg04030.html
obsoletes this patch since it replaces old code with leak with
a more simple one where this bug do not exists.
>
> Cc: address@hidden
> Signed-off-by: Michael S. Tsirkin <address@hidden>
> ---
> 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;
> }
>