From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28925 invoked by alias); 10 Aug 2007 22:29:49 -0000 Received: (qmail 28264 invoked by uid 22791); 10 Aug 2007 22:29:41 -0000 X-Spam-Check-By: sourceware.org Received: from b.mail.sonic.net (HELO b.mail.sonic.net) (64.142.19.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 10 Aug 2007 22:29:36 +0000 Received: from webmail.sonic.net (b.webmail.sonic.net [64.142.100.148]) by b.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id l7AMTY3h017187; Fri, 10 Aug 2007 15:29:34 -0700 Received: from 12.7.175.2 (SquirrelMail authenticated user msnyder) by webmail.sonic.net with HTTP; Fri, 10 Aug 2007 15:29:34 -0700 (PDT) Message-ID: <5061.12.7.175.2.1186784974.squirrel@webmail.sonic.net> In-Reply-To: <200708051852.l75Iq0Du032483@brahms.sibelius.xs4all.nl> References: <9892.12.7.175.2.1186278669.squirrel@webmail.sonic.net> <200708051852.l75Iq0Du032483@brahms.sibelius.xs4all.nl> Date: Fri, 10 Aug 2007 22:29:00 -0000 Subject: Re: [PATCH] c-exp.y, memory leak From: msnyder@sonic.net To: "Mark Kettenis" Cc: 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/msg00228.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.