aboutsummaryrefslogtreecommitdiff
path: root/gdb/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/exec.c')
-rw-r--r--gdb/exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/exec.c b/gdb/exec.c
index 615d5c0..21d3c3c 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -225,11 +225,11 @@ exec_file_attach (char *filename, int from_tty)
&scratch_pathname);
}
#endif
+ if (scratch_chan < 0)
+ perror_with_name (filename);
cleanups = make_cleanup (xfree, scratch_pathname);
- if (scratch_chan < 0)
- perror_with_name (filename);
if (write_files)
exec_bfd = gdb_bfd_fopen (scratch_pathname, gnutarget,
FOPEN_RUB, scratch_chan);