From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26431 invoked by alias); 13 Sep 2008 23:04:13 -0000 Received: (qmail 26419 invoked by uid 22791); 13 Sep 2008 23:04:12 -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; Sat, 13 Sep 2008 23:03:32 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id C56F12A967D; Sat, 13 Sep 2008 19:03:30 -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 PmXOHO+gLljP; Sat, 13 Sep 2008 19:03:30 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 829962A965C; Sat, 13 Sep 2008 19:03:30 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id F189CE7ACD; Sat, 13 Sep 2008 16:03:27 -0700 (PDT) Date: Sat, 13 Sep 2008 23:04:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: RFA: fix minor memory leak in symfile.c Message-ID: <20080913230327.GC19625@adacore.com> References: <20080913171723.GH3714@adacore.com> <20080913223455.GB19625@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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/msg00303.txt.bz2 > My understanding is that on all systems in active use, free(NULL) > works fine. Jim Meyering recently removed if (x) free (x) from a > bunch of GNU programs... We might end up doing it in GDB as well, not sure what the others think. > I also changed a use of asprintf, because gdbint.texinfo clearly > states that this function is not to be used. (It is the only use in > gdb.) Thanks! > 2008-09-13 Tom Tromey > > * varobj.c (varobj_set_display_format): Use xfree. > * tracepoint.c (stringify_collection_list): Use xfree. > * remote-fileio.c (remote_fileio_reset): Use xfree. > * mipsread.c (read_alphacoff_dynamic_symtab): Use xfree. > * dfp.c (decimal_from_floating): Use xfree, xstrprintf. Don't use > asprintf. > * cp-support.c (mangled_name_to_comp): Use xfree. > > Ok if it succeeds? Yes. Thanks for doing this. -- Joel