From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19606 invoked by alias); 10 Aug 2007 22:19:26 -0000 Received: (qmail 19575 invoked by uid 22791); 10 Aug 2007 22:19:26 -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:19:21 +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 l7AMJJom013047 for ; Fri, 10 Aug 2007 15:19:19 -0700 Received: from 12.7.175.2 (SquirrelMail authenticated user msnyder) by webmail.sonic.net with HTTP; Fri, 10 Aug 2007 15:19:19 -0700 (PDT) Message-ID: <5638.12.7.175.2.1186784359.squirrel@webmail.sonic.net> Date: Fri, 10 Aug 2007 22:19:00 -0000 Subject: [PATCH] stack.c, memory leak (no-effect code?) From: msnyder@sonic.net To: gdb-patches@sourceware.org User-Agent: SquirrelMail/1.4.9a MIME-Version: 1.0 Content-Type: multipart/mixed;boundary="----=_20070810151919_76996" 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/msg00227.txt.bz2 ------=_20070810151919_76996 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-length: 194 This patch is to fix a memory leak, but while you're looking at it... does it seem to you that these two blocks have any effect? [Sorry if I posted this before, I've been searching for it...] ------=_20070810151919_76996 Content-Type: text/plain; name="160.txt" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="160.txt" Content-length: 926 2007-08-04 Michael Snyder * stack.c (print_frame): Memory leak. Index: stack.c =================================================================== RCS file: /cvs/src/src/gdb/stack.c,v retrieving revision 1.150 diff -p -r1.150 stack.c *** stack.c 25 Jul 2007 00:28:25 -0000 1.150 --- stack.c 5 Aug 2007 02:16:10 -0000 *************** print_frame (struct frame_info *frame, i *** 582,587 **** --- 582,589 ---- the symbol table. That'll have parameters, but that's preferable to displaying a mangled name. */ funname = SYMBOL_PRINT_NAME (func); + else + xfree (demangled); } } } *************** frame_info (char *addr_exp, int from_tty *** 882,887 **** --- 884,891 ---- preferable to displaying a mangled name. */ if (demangled == NULL) funname = SYMBOL_PRINT_NAME (func); + else + xfree (demangled); } } else ------=_20070810151919_76996--