From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M1d8w-0005Gg-3D for qemu-devel@nongnu.org; Wed, 06 May 2009 05:10:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M1d8r-0005FB-Nr for qemu-devel@nongnu.org; Wed, 06 May 2009 05:10:20 -0400 Received: from [199.232.76.173] (port=44642 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1d8r-0005Ey-D3 for qemu-devel@nongnu.org; Wed, 06 May 2009 05:10:17 -0400 Received: from mailgw3.cms.com ([202.75.200.223]:29208 helo=cms.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M1d8p-00069G-Fj for qemu-devel@nongnu.org; Wed, 06 May 2009 05:10:17 -0400 Subject: Re: [Qemu-devel] [PATCH]:Use qemu_malloc & qemu_free instead of malloc & free From: vibisreenivasan In-Reply-To: <4A003612.4010405@redhat.com> References: <1241519517.2162.6.camel@system> <4A003612.4010405@redhat.com> Content-Type: text/plain Date: Wed, 06 May 2009 12:51:41 +0530 Message-Id: <1241594501.2186.0.camel@system> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Resent-Message-Id: Reply-To: vibi_sreenivasan@cms.com List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org hi Gred, Thanks for pointing that out. I will update patch & send it again. regards vibi On Tue, 2009-05-05 at 14:50 +0200, Gerd Hoffmann wrote: > Hi, > > > - path = malloc(len+1); > > + path = qemu_malloc(len+1); > > snprintf(path, len+1, "%.*s", len, str); > > } else > > path = strdup(str); > > You need s/strdup/qemu_strdup/ here (and maybe elsewhere too), otherwise > you'll mix strdup + qemu_free(). > > cheers, > Gerd > >