From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13340 invoked by alias); 13 Sep 2008 17:18:03 -0000 Received: (qmail 13312 invoked by uid 22791); 13 Sep 2008 17:18:02 -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 17:17:27 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id EED492A9691; Sat, 13 Sep 2008 13:17:25 -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 0rq8kNZRUG5v; Sat, 13 Sep 2008 13:17:25 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 767CD2A966F; Sat, 13 Sep 2008 13:17:25 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 2D4ADE7ACD; Sat, 13 Sep 2008 10:17:23 -0700 (PDT) Date: Sat, 13 Sep 2008 17:18: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: <20080913171723.GH3714@adacore.com> References: 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/msg00294.txt.bz2 :REVIEWMAIL: > While auditing other callers of build_id_bfd_get, I found a use of > 'free', so I fixed that as well. (Perhaps we ought to poison "free"?) I think that's a good idea, since I don't think there is any case besides the xfree implementation where we want to call free. Same for malloc as well. But I'm not very familiar with the pros and cons of this GCC pragma. > 2008-09-13 Tom Tromey > > * symfile.c (build_id_verify): Free 'found'. > (find_separate_debug_file): Use xfree, not free. Looks good :). -- Joel