aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog2
-rw-r--r--gdb/mi/mi-cmd-var.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2057dcc..4d854ee 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,7 @@
2007-08-10 Michael Snyder <msnyder@access-company.com>
+ * mi/mi-cmd-var.c (mi_cmd_var_list_children): Memory leak.
+
* solib-svr4.c (enable_break): Don't free tmp_pathname until
after closing bfd.
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index 12d69ad..37c87ff 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -373,7 +373,10 @@ mi_cmd_var_list_children (char *command, char **argv, int argc)
print_values = PRINT_NO_VALUES;
if (numchild <= 0)
- return MI_CMD_DONE;
+ {
+ xfree (childlist);
+ return MI_CMD_DONE;
+ }
if (mi_version (uiout) == 1)
cleanup_children = make_cleanup_ui_out_tuple_begin_end (uiout, "children");