From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3209 invoked by alias); 25 Jun 2008 13:32:02 -0000 Received: (qmail 3179 invoked by uid 22791); 25 Jun 2008 13:32:02 -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; Wed, 25 Jun 2008 13:31:42 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 7D2C79835A; Wed, 25 Jun 2008 13:31:40 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 6A9F99810F; Wed, 25 Jun 2008 13:31:40 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1KBV63-00025J-Oq; Wed, 25 Jun 2008 09:31:39 -0400 Date: Wed, 25 Jun 2008 13:40:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: teawater , gdb-patches@sourceware.org, Jan Kratochvil Subject: Re: [patch]: Fix memory leak of c-exp.y Message-ID: <20080625133139.GA5180@caradoc.them.org> Mail-Followup-To: Joel Brobecker , teawater , gdb-patches@sourceware.org, Jan Kratochvil References: <20080625124303.GB3700@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080625124303.GB3700@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-06/txt/msg00429.txt.bz2 On Wed, Jun 25, 2008 at 08:43:03AM -0400, Joel Brobecker wrote: > Hi teawater, > > > 2008-06-21 Hui Zhu > > * gdb/c-exp.y: Fix memory leak of function parse_number > > Instead of adding calls to free, I looks like this string is actually > completely local, so how about replacing the call to malloc with a > call to alloca, and then get rid of all calls to free instead? Let's go with Jan's version for now - he's fixed a few related problems in the same function. Jan, that patch is OK. -- Daniel Jacobowitz CodeSourcery