aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi/mi-cmd-var.c
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/mi/mi-cmd-var.c
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/mi/mi-cmd-var.c')
-rw-r--r--gdb/mi/mi-cmd-var.c5
1 files changed, 4 insertions, 1 deletions
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");