fix in solib-aix.c
authorTom Tromey <tromey@redhat.com>
Thu, 30 May 2013 17:31:00 +0000 (17:31 +0000)
committerTom Tromey <tromey@redhat.com>
Thu, 30 May 2013 17:31:00 +0000 (17:31 +0000)
solib_aix_bfd_open has an early "return" that doesn't run cleanups.
This fixes the problem by dropping the null_cleanup and using a later
cleanup as the master cleanup for the function.

* solib-aix.c (solib_aix_bfd_open): Don't use a null cleanup
for 'cleanup'; instead use a later one.

gdb/ChangeLog
gdb/solib-aix.c

index 666868f396e5f566bc2dc7b5cd21e7dee2b56575..89298e88b3716c679d0da1778034724d2b7518dc 100644 (file)
@@ -1,3 +1,8 @@
+2013-05-30  Tom Tromey  <tromey@redhat.com>
+
+       * solib-aix.c (solib_aix_bfd_open): Don't use a null cleanup
+       for 'cleanup'; instead use a later one.
+
 2013-05-30  Tom Tromey  <tromey@redhat.com>
 
        * python/py-breakpoint.c (bppy_get_commands): Use
index 5d15e7045af3041dc3a3b305f7793a7f9b50c850..efc0dc5e259eb7216e8bdef8a9789685920a52cf 100644 (file)
@@ -647,7 +647,7 @@ solib_aix_bfd_open (char *pathname)
   int filename_len;
   char *member_name;
   bfd *archive_bfd, *object_bfd;
-  struct cleanup *cleanup = make_cleanup (null_cleanup, NULL);
+  struct cleanup *cleanup;
 
   if (pathname[path_len - 1] != ')')
     return solib_bfd_open (pathname);
@@ -665,7 +665,7 @@ solib_aix_bfd_open (char *pathname)
   filename_len = sep - pathname;
 
   filename = xstrprintf ("%.*s", filename_len, pathname);
-  make_cleanup (xfree, filename);
+  cleanup = make_cleanup (xfree, filename);
   member_name = xstrprintf ("%.*s", path_len - filename_len - 2, sep + 1);
   make_cleanup (xfree, member_name);
 
This page took 0.030113 seconds and 4 git commands to generate.