Use class to manage BFD reference counts
[deliverable/binutils-gdb.git] / gdb / coffread.c
index 728e4b698dfae36a68eb74057e6859f7e2900e06..9db479255731a532737983e9ec5171bcd386ab2f 100644 (file)
@@ -742,10 +742,10 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
 
       if (debugfile)
        {
-         bfd *abfd = symfile_bfd_open (debugfile);
+         gdb_bfd_ref_ptr abfd (symfile_bfd_open (debugfile));
 
-         make_cleanup_bfd_unref (abfd);
-         symbol_file_add_separate (abfd, debugfile, symfile_flags, objfile);
+         symbol_file_add_separate (abfd.get (), debugfile, symfile_flags,
+                                   objfile);
        }
     }
 
This page took 0.025558 seconds and 4 git commands to generate.