From 724b958c4168d40f59a35112c36ebf9e02c43d56 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 30 Oct 2008 20:35:31 +0000 Subject: * cli/cli-logging.c (handle_redirections): Make a cleanup. * reggroups.c (maintenance_print_reggroups): Make a cleanup. * regcache.c (regcache_print): Make a cleanup. * maint.c (maintenance_print_architecture): Make a cleanup. * dummy-frame.c (maintenance_print_dummy_frames): Make a cleanup. --- gdb/maint.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gdb/maint.c') diff --git a/gdb/maint.c b/gdb/maint.c index e64d4fe..365e374 100644 --- a/gdb/maint.c +++ b/gdb/maint.c @@ -414,11 +414,13 @@ maintenance_print_architecture (char *args, int from_tty) gdbarch_dump (current_gdbarch, gdb_stdout); else { + struct cleanup *cleanups; struct ui_file *file = gdb_fopen (args, "w"); if (file == NULL) perror_with_name (_("maintenance print architecture")); + cleanups = make_cleanup_ui_file_delete (file); gdbarch_dump (current_gdbarch, file); - ui_file_delete (file); + do_cleanups (cleanups); } } -- cgit v1.1