long storage_needed;
CORE_ADDR sym_addr;
- abfd = bfd_fdopenr ("unamed", 0, fd);
+ abfd = gdb_bfd_ref (bfd_fdopenr ("unamed", 0, fd));
if (abfd == NULL)
{
warning (_("Failed to create a bfd: %s."), bfd_errmsg (bfd_get_error ()));
{
/* Not the correct format, so we can not possibly find the dbx_link
symbol in it. */
- bfd_close (abfd);
+ gdb_bfd_unref (abfd);
return 0;
}
if (dbx_link_bpt == NULL)
{
warning (_("Failed to insert dbx_link breakpoint."));
- bfd_close (abfd);
+ gdb_bfd_unref (abfd);
return 0;
}
- bfd_close (abfd);
+ gdb_bfd_unref (abfd);
return 1;
}
- bfd_close (abfd);
+ gdb_bfd_unref (abfd);
return 0;
}