* dwarf2read.c (try_open_dwo_file): Use gdb_bfd_ref and
[deliverable/binutils-gdb.git] / gdb / spu-linux-nat.c
index 2dfec8c12889d1c5fc52c13fe3a08fbff240e517..aeb7242ff37346cd2ebc6e3cb458d858bc6a086f 100644 (file)
@@ -321,10 +321,11 @@ spu_bfd_open (ULONGEST addr)
                          spu_bfd_iovec_stat);
   if (!nbfd)
     return NULL;
+  nbfd = gdb_bfd_ref (nbfd);
 
   if (!bfd_check_format (nbfd, bfd_object))
     {
-      bfd_close (nbfd);
+      gdb_bfd_unref (nbfd);
       return NULL;
     }
 
This page took 0.027871 seconds and 4 git commands to generate.