diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 666868f396..89298e88b3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-05-30 Tom Tromey + + * 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 * python/py-breakpoint.c (bppy_get_commands): Use diff --git a/gdb/solib-aix.c b/gdb/solib-aix.c index 5d15e7045a..efc0dc5e25 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);