From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvVwq-0003uo-SN for qemu-devel@nongnu.org; Wed, 07 Oct 2009 08:48:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvVwm-0003sh-Kl for qemu-devel@nongnu.org; Wed, 07 Oct 2009 08:48:52 -0400 Received: from [199.232.76.173] (port=37171 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvVwm-0003sb-FV for qemu-devel@nongnu.org; Wed, 07 Oct 2009 08:48:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14712) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvVwl-0006Km-Vr for qemu-devel@nongnu.org; Wed, 07 Oct 2009 08:48:48 -0400 Date: Wed, 7 Oct 2009 09:48:38 -0300 From: Luiz Capitulino Message-ID: <20091007094838.6b5a0fb3@doriath> In-Reply-To: <4ACBF0E7.1010207@us.ibm.com> References: <1254875232-25012-1-git-send-email-lcapitulino@redhat.com> <1254875232-25012-3-git-send-email-lcapitulino@redhat.com> <4ACBF0E7.1010207@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 02/15] Introduce QList List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, avi@redhat.com On Tue, 06 Oct 2009 20:37:43 -0500 Anthony Liguori wrote: > Luiz Capitulino wrote: [...] > > +/** > > + * qlist_destroy_obj(): Free all the memory allocated by a QList > > + */ > > +static void qlist_destroy_obj(QObject *obj) > > +{ > > + QList *qlist; > > + QListEntry *entry, *next_entry; > > + > > + assert(obj != NULL); > > > > Usually accepting NULL in a free function makes for nicer exit paths in > function. The destroy_obj() functions are always called by qobject_decref() and it will never pass a NULL qobject. But qobject_decref() accepts NULL. I've applied the other changes, some of them also need to be done in the others data types (will send patches).