From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5962 invoked by alias); 13 Sep 2008 23:47:36 -0000 Received: (qmail 5953 invoked by uid 22791); 13 Sep 2008 23:47:36 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 13 Sep 2008 23:47:01 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id m8DNkNEu014336; Sun, 14 Sep 2008 01:46:23 +0200 (CEST) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id m8DNkMwu031441; Sun, 14 Sep 2008 01:46:22 +0200 (CEST) Date: Sat, 13 Sep 2008 23:47:00 -0000 Message-Id: <200809132346.m8DNkMwu031441@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: brobecker@adacore.com CC: tromey@redhat.com, gdb-patches@sourceware.org In-reply-to: <20080913230327.GC19625@adacore.com> (message from Joel Brobecker on Sat, 13 Sep 2008 16:03:27 -0700) Subject: Re: RFA: fix minor memory leak in symfile.c References: <20080913171723.GH3714@adacore.com> <20080913223455.GB19625@adacore.com> <20080913230327.GC19625@adacore.com> 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/msg00306.txt.bz2 > Date: Sat, 13 Sep 2008 16:03:27 -0700 > From: Joel Brobecker > > > 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 don't see why we should change our policy to use xfree(), but the main reason why we didn't rely on free(NULL) doing nothing was SunOS 4. There's probably no point in supporting GDB on that platform anymore, so I think requiring a C89 libc would be reasonable. Mark