Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] stack.c, memory leak (no-effect code?)
@ 2007-08-10 22:19 msnyder
  2007-08-13 19:41 ` Jim Blandy
  0 siblings, 1 reply; 4+ messages in thread
From: msnyder @ 2007-08-10 22:19 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 194 bytes --]

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...]


[-- Attachment #2: 160.txt --]
[-- Type: text/plain, Size: 926 bytes --]

2007-08-04  Michael Snyder  <msnyder@access-company.com>

	* 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-08-18  0:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-10 22:19 [PATCH] stack.c, memory leak (no-effect code?) msnyder
2007-08-13 19:41 ` Jim Blandy
2007-08-13 22:27   ` msnyder
2007-08-18  0:20     ` msnyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox