summaryrefslogtreecommitdiff
path: root/gdb/solib-aix.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-05-30 17:30:59 +0000
committerTom Tromey <tromey@redhat.com>2013-05-30 17:30:59 +0000
commit0abc7a2bdbfb6c3e08c7d89dae7a50297c18ccd0 (patch)
tree198a803794ef5405c7e7df9a026b262f01d55ff0 /gdb/solib-aix.c
parent232cf858dc9952f123510778333b2e8ab2dc56f9 (diff)
downloadgdb-0abc7a2bdbfb6c3e08c7d89dae7a50297c18ccd0.tar.gz
fix in solib-aix.c
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.
Diffstat (limited to 'gdb/solib-aix.c')
-rw-r--r--gdb/solib-aix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/solib-aix.c b/gdb/solib-aix.c
index 5d15e7045af..efc0dc5e259 100644
--- a/gdb/solib-aix.c
+++ b/gdb/solib-aix.c
@@ -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);