2007-08-17 Michael Snyder <msnyder@access-company.com>
authorMichael Snyder <msnyder@vmware.com>
Sat, 18 Aug 2007 00:21:03 +0000 (00:21 +0000)
committerMichael Snyder <msnyder@vmware.com>
Sat, 18 Aug 2007 00:21:03 +0000 (00:21 +0000)
* stack.c (print_frame): Memory leak.

gdb/ChangeLog
gdb/stack.c

index 29c8cc303ac21000576c9bd0ee9220ddc88d3052..c5075539ce42c8c0e96c422adfa984015a818756 100644 (file)
@@ -1,5 +1,7 @@
 2007-08-17  Michael Snyder  <msnyder@access-company.com>
 
+       * stack.c (print_frame): Memory leak.
+
        * completer.c (filename_completer): Avoid memory leak.
        Remove unnecessary nested block.
 
index c022a3154bbc14681b8995743213746fb29de9d7..544d693fe08ebbe3e14aca072a614f6f7f4256e8 100644 (file)
@@ -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