From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M9z3m-0007RY-NN for qemu-devel@nongnu.org; Fri, 29 May 2009 06:11:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M9z3h-0007Ph-Qx for qemu-devel@nongnu.org; Fri, 29 May 2009 06:11:34 -0400 Received: from [199.232.76.173] (port=59287 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M9z3h-0007PT-CK for qemu-devel@nongnu.org; Fri, 29 May 2009 06:11:29 -0400 Received: from mx2.redhat.com ([66.187.237.31]:43967) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M9z3g-0003Yb-SW for qemu-devel@nongnu.org; Fri, 29 May 2009 06:11:29 -0400 Message-ID: <4A1FB48F.3080707@redhat.com> Date: Fri, 29 May 2009 12:10:23 +0200 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently References: <33057688.68811243591259350.JavaMail.root@srv-05.w4a.fr> In-Reply-To: <33057688.68811243591259350.JavaMail.root@srv-05.w4a.fr> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: jcd@tribudubois.net Cc: qemu-devel@nongnu.org jcd@tribudubois.net schrieb: > Kevin, > > I certainly understand your goal ... > > Anyway, I will update my patche and resubmit. > > BTW it has to be noted that most of the time the return value of malloc/qemu_malloc is not checked which can also prove problematic whatever the qemu_malloc/malloc behavior is. It doesn't need to be checked, qemu_malloc never returns if it fails. If malloc(0) returns NULL (on success!) checking it is even wrong in places where this can happen. Kevin