[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] pci: fix pci_unregister_secondary_bus().
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH] pci: fix pci_unregister_secondary_bus(). |
Date: |
Fri, 09 Jul 2010 08:46:33 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Isaku Yamahata <address@hidden> writes:
> Fix leak in pci_unregister_secondary_bus().
> call qbus_free().
>
> Signed-off-by: Isaku Yamahata <address@hidden>
> ---
> hw/pci.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/hw/pci.c b/hw/pci.c
> index a7ff566..25634ed 100644
> --- a/hw/pci.c
> +++ b/hw/pci.c
> @@ -298,6 +298,7 @@ static void pci_unregister_secondary_bus(PCIBus *bus)
> {
> assert(QLIST_EMPTY(&bus->child));
> QLIST_REMOVE(bus, sibling);
> + qbus_free(&bus->qbus);
> }
>
> int pci_bus_num(PCIBus *s)
Buses are normally freed automatically along with the device providing
them, in qdev_free(). Why is that not sufficient for pci-bridge?