From 5fe41fbfa22275d2a277b408bf52fedec34e8336 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 27 Jun 2011 19:21:51 +0000 Subject: * valops.c (find_overload_match): Call do_cleanups before early return. * top.c (execute_command): Call do_cleanups before early return. (command_loop): Likewise. * stack.c (backtrace_command): Make a null cleanup early. Don't conditionally call do_cleanups. * python/py-value.c (TRY_CATCH): Move cleanup handling into TRY_CATCH. * python/py-breakpoint.c (gdbpy_breakpoint_has_py_cond): Rearrange so cleanups are always run. * mi/mi-cmd-var.c (mi_cmd_var_delete): Reset old_cleanups. * findcmd.c (parse_find_args): Call do_cleanups on early return path. * dbxread.c (elfstab_build_psymtabs): Make a null cleanup early. Don't conditionally call do_cleanups. * cli/cli-script.c (execute_user_command): Initialize 'old_chain' later. --- gdb/mi/mi-cmd-var.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/mi') diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c index a401846..aee6224 100644 --- a/gdb/mi/mi-cmd-var.c +++ b/gdb/mi/mi-cmd-var.c @@ -196,7 +196,7 @@ mi_cmd_var_delete (char *command, char **argv, int argc) children_only_p = 1; do_cleanups (old_cleanups); name = xstrdup (argv[1]); - make_cleanup (free_current_contents, &name); + old_cleanups = make_cleanup (free_current_contents, &name); } /* If we didn't error out, now NAME contains the name of the -- cgit v1.1