From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=55193 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OX7f2-0008Ou-6r for qemu-devel@nongnu.org; Fri, 09 Jul 2010 03:06:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OX7f0-0001bI-K9 for qemu-devel@nongnu.org; Fri, 09 Jul 2010 03:06:11 -0400 Received: from mail.valinux.co.jp ([210.128.90.3]:40695) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OX7f0-0001ai-CS for qemu-devel@nongnu.org; Fri, 09 Jul 2010 03:06:10 -0400 Date: Fri, 9 Jul 2010 16:02:06 +0900 From: Isaku Yamahata Subject: Re: [Qemu-devel] [PATCH] pci: fix pci_unregister_secondary_bus(). Message-ID: <20100709070206.GE22818@valinux.co.jp> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org, mst@redhat.com On Fri, Jul 09, 2010 at 08:46:33AM +0200, Markus Armbruster wrote: > Isaku Yamahata writes: > > > Fix leak in pci_unregister_secondary_bus(). > > call qbus_free(). > > > > Signed-off-by: Isaku Yamahata > > --- > > 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? > Right. I withdraw this patch. Sorry for noise. -- yamahata