aboutsummaryrefslogtreecommitdiff
path: root/gdb/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/exec.c')
-rw-r--r--gdb/exec.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/exec.c b/gdb/exec.c
index 540c271..dc9258a 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -233,9 +233,10 @@ exec_file_attach (char *filename, int from_tty)
if (scratch_chan < 0)
perror_with_name (filename);
- exec_bfd = gdb_bfd_ref (bfd_fopen (scratch_pathname, gnutarget,
- write_files ? FOPEN_RUB : FOPEN_RB,
- scratch_chan));
+ exec_bfd = bfd_fopen (scratch_pathname, gnutarget,
+ write_files ? FOPEN_RUB : FOPEN_RB,
+ scratch_chan);
+ gdb_bfd_ref (exec_bfd);
if (!exec_bfd)
{