2007-08-08 Michael Snyder <msnyder@access-company.com>
authorMichael Snyder <msnyder@vmware.com>
Wed, 8 Aug 2007 18:34:28 +0000 (18:34 +0000)
committerMichael Snyder <msnyder@vmware.com>
Wed, 8 Aug 2007 18:34:28 +0000 (18:34 +0000)
* top.c (command_line_input): Memory leak.

gdb/ChangeLog
gdb/top.c

index 900d5c2b53e03c9e0759c304892ec98b16df2b3c..998b54d5b10045004c773db1e4bc4b5f98d8b296 100644 (file)
@@ -1,5 +1,7 @@
 2007-08-08  Michael Snyder  <msnyder@access-company.com>
 
+       * top.c (command_line_input): Memory leak.
+
        * solib-svr4.c (open_symbol_file_object): Memory leak.
        (svr4_current_sos): Ditto.
        (enable_break): Ditto.
index 14a7c56856de16cdcbc46f41de58c8b5e62db2c0..f47c7af146c5b732506ae5134407f15dd4355eac 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1093,8 +1093,8 @@ command_line_input (char *prompt_arg, int repeat, char *annotation_suffix)
            }
          strcpy (linebuffer, history_value);
          p = linebuffer + strlen (linebuffer);
-         xfree (history_value);
        }
+      xfree (history_value);
     }
 
   /* If we just got an empty line, and that is supposed