diff options
author | Andrew Cagney <cagney@redhat.com> | 2000-05-16 04:57:49 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2000-05-16 04:57:49 +0000 |
commit | e2f9c4749114f7ddcd18e62e5559d0fa14bf0935 (patch) | |
tree | b03b48f1bbc38e03f1baab6f5a5575d2b8128caf /gdb/mi/mi-main.c | |
parent | 56e290f494ab802bbc5c26c445dad0d1e6a7f37b (diff) | |
download | binutils-gdb-e2f9c4749114f7ddcd18e62e5559d0fa14bf0935.tar.gz |
Make free_current_contents more robust. Use in MI.
Diffstat (limited to 'gdb/mi/mi-main.c')
-rw-r--r-- | gdb/mi/mi-main.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 22745a07691..872b7b20f2b 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -70,7 +70,6 @@ static enum mi_cmd_result mi_execute_async_cli_command (char *mi, char *args, in static void mi_execute_command_wrapper (char *cmd); void mi_exec_async_cli_cmd_continuation (struct continuation_arg *arg); -static void free_and_reset (char **arg); static int register_changed_p (int regnum); static int get_register (int regnum, int format); @@ -1199,7 +1198,7 @@ mi_cmd_execute (struct mi_parse *parse) } } last_async_command = xstrdup (parse->token); - make_exec_cleanup ((make_cleanup_func) free_and_reset, &last_async_command); + make_exec_cleanup (free_current_contents, &last_async_command); /* FIXME: DELETE THIS! */ if (parse->cmd->args_func != NULL) return parse->cmd->args_func (parse->args, 0 /*from_tty */ ); @@ -1226,13 +1225,6 @@ mi_cmd_execute (struct mi_parse *parse) } } -void -free_and_reset (char **arg) -{ - free (*arg); - *arg = NULL; -} - static void mi_execute_command_wrapper (char *cmd) { |