* dwarf2read.c (try_open_dwo_file): Use gdb_bfd_ref and
[deliverable/binutils-gdb.git] / gdb / record.c
index bb0fe5224f643d9ec65b3646984475e1065c0623..ec42aac9d1d43dc3bd9d3dc90ed342c9e86fecac 100644 (file)
@@ -32,6 +32,7 @@
 #include "gcore.h"
 #include "event-loop.h"
 #include "inf-loop.h"
+#include "gdb_bfd.h"
 
 #include <signal.h>
 
@@ -2638,7 +2639,7 @@ record_save_cleanups (void *data)
   bfd *obfd = data;
   char *pathname = xstrdup (bfd_get_filename (obfd));
 
-  bfd_close (obfd);
+  gdb_bfd_unref (obfd);
   unlink (pathname);
   xfree (pathname);
 }
@@ -2854,7 +2855,7 @@ cmd_record_save (char *args, int from_tty)
     }
 
   do_cleanups (set_cleanups);
-  bfd_close (obfd);
+  gdb_bfd_unref (obfd);
   discard_cleanups (old_cleanups);
 
   /* Succeeded.  */
This page took 0.035172 seconds and 4 git commands to generate.