Remove gdb_bfd_stash_filename to fix crash with fix of binutils/11983
[deliverable/binutils-gdb.git] / gdb / solib-aix.c
index 080a17bcdce55926e9d38f2a6cf7a1bdf98b4511..fefa51ff8e0758755e284b9be9e3f63321a4be63 100644 (file)
@@ -728,12 +728,8 @@ solib_aix_bfd_open (char *pathname)
      to allow commands listing all shared libraries to display that
      synthetic name.  Otherwise, we would only be displaying the name
      of the archive member object.  */
-    {
-      char *data = bfd_alloc (object_bfd, path_len + 1);
-
-      strcpy (data, pathname);
-      object_bfd->filename = data;
-    }
+  xfree (bfd_get_filename (object_bfd));
+  object_bfd->filename = xstrdup (pathname);
 
   gdb_bfd_unref (archive_bfd);
   do_cleanups (cleanup);
This page took 0.02592 seconds and 4 git commands to generate.