aboutsummaryrefslogtreecommitdiff
path: root/gdb/spu-linux-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/spu-linux-nat.c')
-rw-r--r--gdb/spu-linux-nat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/spu-linux-nat.c b/gdb/spu-linux-nat.c
index 2dfec8c..aeb7242 100644
--- a/gdb/spu-linux-nat.c
+++ b/gdb/spu-linux-nat.c
@@ -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;
}