From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21287 invoked by alias); 18 Sep 2008 02:31:47 -0000 Received: (qmail 21276 invoked by uid 22791); 18 Sep 2008 02:31:47 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 18 Sep 2008 02:31:08 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id E609310CF4; Thu, 18 Sep 2008 02:31:05 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 5F7AB10CF2; Thu, 18 Sep 2008 02:31:04 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1Kg9IN-0001JB-Bu; Wed, 17 Sep 2008 22:31:03 -0400 Date: Thu, 18 Sep 2008 02:31:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: Thiago Jung Bauermann , Tom Tromey , gdb-patches@sourceware.org Subject: Re: RFA: fix minor memory leak in symfile.c Message-ID: <20080918023103.GA4940@caradoc.them.org> Mail-Followup-To: Joel Brobecker , Thiago Jung Bauermann , Tom Tromey , gdb-patches@sourceware.org References: <20080913171723.GH3714@adacore.com> <20080913223455.GB19625@adacore.com> <1221433676.17278.1.camel@localhost.localdomain> <20080918010418.GC3651@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080918010418.GC3651@adacore.com> User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-09/txt/msg00382.txt.bz2 On Wed, Sep 17, 2008 at 06:04:18PM -0700, Joel Brobecker wrote: > > When I added that use of asprintf, I checked that libiberty provides it > > if the underlying OS doesn't. I thought we could use anything covered by > > libiberty. Maybe not? > > Not sure. I don't think that it is a portability issue, but rather > to provide an interface where any issues causes an error to be thrown. > That way, no need to check the pointer returned, nor the status code, > and thus it's not possible to forget. I think it's the same as xmalloc. Yes - thus xstrprintf, I believe. -- Daniel Jacobowitz CodeSourcery