aboutsummaryrefslogtreecommitdiff
path: root/gdb/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/exec.c')
-rw-r--r--gdb/exec.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/exec.c b/gdb/exec.c
index 2fa543b..326cfff 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -248,8 +248,7 @@ exec_file_attach (const char *filename, int from_tty)
/* First, acquire a reference to the current exec_bfd. We release
this at the end of the function; but acquiring it now lets the
BFD cache return it if this call refers to the same file. */
- gdb_bfd_ref (exec_bfd);
- gdb_bfd_ref_ptr exec_bfd_holder (exec_bfd);
+ gdb_bfd_ref_ptr exec_bfd_holder = new_bfd_ref (exec_bfd);
/* Remove any previous exec file. */
exec_close ();