diff options
author | Tom Tromey <tromey@redhat.com> | 2013-05-30 17:31:00 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-05-30 17:31:00 +0000 |
commit | e35ac9bf5c3e411f6c41cceb4651402674797da0 (patch) | |
tree | 62a7e0e907107ccf25393776b5a36bdec4d8aeef /gdb | |
parent | f3300387104722cbfcfc955bdacb474c7f33ba9e (diff) | |
download | gdb-e35ac9bf5c3e411f6c41cceb4651402674797da0.zip gdb-e35ac9bf5c3e411f6c41cceb4651402674797da0.tar.gz gdb-e35ac9bf5c3e411f6c41cceb4651402674797da0.tar.bz2 |
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')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/solib-aix.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 666868f..89298e8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 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 explicit, unconditional return. * python/py-frame.c (frapy_read_var): Likewise. diff --git a/gdb/solib-aix.c b/gdb/solib-aix.c index 5d15e70..efc0dc5 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); |