diff options
author | Alan Modra <amodra@gmail.com> | 2000-05-25 02:05:08 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2000-05-25 02:05:08 +0000 |
commit | f190c5c4e9f943206ff661ee21546d067ceb09d0 (patch) | |
tree | 94107dd762a1d678543786d1f436543aaf7dcf52 /binutils/objdump.c | |
parent | e0c9811a9097ab88de669ce1109f8d63c9732e0d (diff) | |
download | gdb-f190c5c4e9f943206ff661ee21546d067ceb09d0.zip gdb-f190c5c4e9f943206ff661ee21546d067ceb09d0.tar.gz gdb-f190c5c4e9f943206ff661ee21546d067ceb09d0.tar.bz2 |
Ensure bfd_close after bfd_openw so we don't get multiple bfd_openw
calls for same file.
Diffstat (limited to 'binutils/objdump.c')
-rw-r--r-- | binutils/objdump.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c index cd61ec0..522f6ec 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -2653,6 +2653,7 @@ display_target_list () { if (bfd_get_error () != bfd_error_invalid_operation) nonfatal (p->name); + bfd_close (abfd); continue; } @@ -2660,6 +2661,7 @@ display_target_list () if (bfd_set_arch_mach (abfd, (enum bfd_architecture) a, 0)) printf (" %s\n", bfd_printable_arch_mach ((enum bfd_architecture) a, 0)); + bfd_close (abfd); } unlink (dummy_name); free (dummy_name); @@ -2727,6 +2729,8 @@ display_info_table (first, last) putchar ('-'); putchar (' '); } + if (abfd != NULL) + bfd_close (abfd); } putchar ('\n'); } |