* dwarf2read.c (try_open_dwo_file): Use gdb_bfd_ref and
[deliverable/binutils-gdb.git] / gdb / solib-pa64.c
index 2b8d06156025893b063aeba131112e14b9c3b5a2..b55b67cff138d8032bb73394e0e967128c110c27 100644 (file)
@@ -362,7 +362,7 @@ manpage for methods to privately map shared library text."));
         to find any magic formula to find it for Solaris (appears to
         be trivial on GNU/Linux).  Therefore, we have to try an alternate
         mechanism to find the dynamic linker's base address.  */
-      tmp_bfd = bfd_openr (buf, gnutarget);
+      tmp_bfd = gdb_bfd_ref (bfd_openr (buf, gnutarget));
       if (tmp_bfd == NULL)
        return;
 
@@ -371,7 +371,7 @@ manpage for methods to privately map shared library text."));
        {
          warning (_("Unable to grok dynamic linker %s as an object file"),
                   buf);
-         bfd_close (tmp_bfd);
+         gdb_bfd_unref (tmp_bfd);
          return;
        }
 
@@ -401,7 +401,7 @@ manpage for methods to privately map shared library text."));
       }
 
       /* We're done with the temporary bfd.  */
-      bfd_close (tmp_bfd);
+      gdb_bfd_unref (tmp_bfd);
     }
 }
 
This page took 0.025516 seconds and 4 git commands to generate.