From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19393 invoked by alias); 17 Aug 2007 23:28:49 -0000 Received: (qmail 19274 invoked by uid 22791); 17 Aug 2007 23:28:48 -0000 X-Spam-Check-By: sourceware.org Received: from a.mail.sonic.net (HELO a.mail.sonic.net) (64.142.16.245) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 17 Aug 2007 23:28:45 +0000 Received: from webmail.sonic.net (b.webmail.sonic.net [64.142.100.148]) by a.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id l7HNShsu007127; Fri, 17 Aug 2007 16:28:43 -0700 Received: from 12.7.175.2 (SquirrelMail authenticated user msnyder) by webmail.sonic.net with HTTP; Fri, 17 Aug 2007 16:28:43 -0700 (PDT) Message-ID: <19531.12.7.175.2.1187393323.squirrel@webmail.sonic.net> In-Reply-To: <5061.12.7.175.2.1186784974.squirrel@webmail.sonic.net> References: <9892.12.7.175.2.1186278669.squirrel@webmail.sonic.net> <200708051852.l75Iq0Du032483@brahms.sibelius.xs4all.nl> <5061.12.7.175.2.1186784974.squirrel@webmail.sonic.net> Date: Fri, 17 Aug 2007 23:28:00 -0000 Subject: Re: [PATCH] c-exp.y, memory leak From: msnyder@sonic.net To: msnyder@sonic.net Cc: "Mark Kettenis" , msnyder@sonic.net, gdb-patches@sourceware.org User-Agent: SquirrelMail/1.4.9a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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: 2007-08/txt/msg00346.txt.bz2 >>> Date: Sat, 4 Aug 2007 18:51:09 -0700 (PDT) >>> From: msnyder@sonic.net >>> >>> 2007-08-04 Michael Snyder >>> >>> * c-exp.y (parse_number): Memory leak. >> >> Shouldn't this use xfree()? > > Actually, although arguably they should -- I'm not so sure. > > It's kind of a mess -- c-exp.y uses malloc, and then Makefile.in > runs sed on c-exp.c to transform malloc to xmalloc. No such sed > transform is done to convert free to xfree, and there is at least > one other call to free in there that does not get converted. > > I'm reluctant to mess with the sed scripts. "free" is just too > common a string. Alright -- I'm going to commit this using "free" rather than "xfree", on the premise that the file already calls free once, and doesn't call xfree at all.