aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-darwin.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/solib-darwin.c')
-rw-r--r--gdb/solib-darwin.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/gdb/solib-darwin.c b/gdb/solib-darwin.c
index bc2cd79..242f8cc 100644
--- a/gdb/solib-darwin.c
+++ b/gdb/solib-darwin.c
@@ -510,17 +510,10 @@ darwin_bfd_open (char *pathname)
gdbarch_bfd_arch_info (target_gdbarch));
if (!res)
{
- gdb_bfd_unref (abfd);
- make_cleanup (xfree, found_pathname);
+ make_cleanup_bfd_close (abfd);
error (_("`%s': not a shared-library: %s"),
- found_pathname, bfd_errmsg (bfd_get_error ()));
+ bfd_get_filename (abfd), bfd_errmsg (bfd_get_error ()));
}
-
- /* Make sure that the filename is malloc'ed. The current filename
- for fat-binaries BFDs is a name that was generated by BFD, usually
- a static string containing the name of the architecture. */
- res->filename = xstrdup (pathname);
-
return res;
}