aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2007-08-10 21:44:23 +0000
committerMichael Snyder <msnyder@vmware.com>2007-08-10 21:44:23 +0000
commit76bd6e0b6e6079d4da328e7fc8eec3897703b4af (patch)
tree29ffbcbba4097447c53e29c2312a9ab9210b0559 /gdb
parent518f9d3cd44c05875cb6cdfe16033f45668d844f (diff)
downloadgdb-76bd6e0b6e6079d4da328e7fc8eec3897703b4af.zip
gdb-76bd6e0b6e6079d4da328e7fc8eec3897703b4af.tar.gz
gdb-76bd6e0b6e6079d4da328e7fc8eec3897703b4af.tar.bz2
2007-08-10 Michael Snyder <msnyder@access-company.com>
* mi/mi-cmd-var.c (mi_cmd_var_list_children): Memory leak.
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");