From f91162e1998a368455be2b8fb573ffc0e1322e7f Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Sat, 18 Aug 2007 00:21:03 +0000 Subject: [PATCH] 2007-08-17 Michael Snyder * stack.c (print_frame): Memory leak. --- gdb/ChangeLog | 2 ++ gdb/stack.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 29c8cc303ac..c5075539ce4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ 2007-08-17 Michael Snyder + * stack.c (print_frame): Memory leak. + * completer.c (filename_completer): Avoid memory leak. Remove unnecessary nested block. diff --git a/gdb/stack.c b/gdb/stack.c index c022a3154bb..544d693fe08 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -582,6 +582,8 @@ print_frame (struct frame_info *frame, int print_level, the symbol table. That'll have parameters, but that's preferable to displaying a mangled name. */ funname = SYMBOL_PRINT_NAME (func); + else + xfree (demangled); } } } @@ -882,6 +884,8 @@ frame_info (char *addr_exp, int from_tty) preferable to displaying a mangled name. */ if (demangled == NULL) funname = SYMBOL_PRINT_NAME (func); + else + xfree (demangled); } } else -- 2.30.2