From: Michael Snyder Date: Fri, 10 Aug 2007 21:44:23 +0000 (+0000) Subject: 2007-08-10 Michael Snyder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=76bd6e0b6e6079d4da328e7fc8eec3897703b4af;p=binutils-gdb.git 2007-08-10 Michael Snyder * mi/mi-cmd-var.c (mi_cmd_var_list_children): Memory leak. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2057dcc3ed2..4d854ee2f87 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ 2007-08-10 Michael Snyder + * 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 12d69adbea8..37c87ff1da3 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");