From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2435 invoked by alias); 18 Sep 2008 01:04:58 -0000 Received: (qmail 2424 invoked by uid 22791); 18 Sep 2008 01:04:58 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 18 Sep 2008 01:04:23 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id BF1102A963E; Wed, 17 Sep 2008 21:04:21 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id oISOCi2hZ-pC; Wed, 17 Sep 2008 21:04:21 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 76D7C2A963A; Wed, 17 Sep 2008 21:04:21 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 0A8C5E7ACD; Wed, 17 Sep 2008 18:04:18 -0700 (PDT) Date: Thu, 18 Sep 2008 01:04:00 -0000 From: Joel Brobecker To: Thiago Jung Bauermann Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: RFA: fix minor memory leak in symfile.c Message-ID: <20080918010418.GC3651@adacore.com> References: <20080913171723.GH3714@adacore.com> <20080913223455.GB19625@adacore.com> <1221433676.17278.1.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1221433676.17278.1.camel@localhost.localdomain> User-Agent: Mutt/1.4.2.2i 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/msg00381.txt.bz2 > 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. -- Joel