aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2000-05-25 03:13:39 +0000
committerAlan Modra <amodra@gmail.com>2000-05-25 03:13:39 +0000
commit96bd4a1a5a70cdef64c5598f9643011e226bc992 (patch)
tree0e4f4e20ef2a20084945cb1a20f52b9796e6eb63
parentOops. Forgot to say "configure: Regenerate". (diff)
downloadbinutils-gdb-96bd4a1a5a70cdef64c5598f9643011e226bc992.tar.gz
binutils-gdb-96bd4a1a5a70cdef64c5598f9643011e226bc992.tar.bz2
binutils-gdb-96bd4a1a5a70cdef64c5598f9643011e226bc992.zip
Ensure bfd_close after bfd_openw so we don't get multiple bfd_openw
calls for same file.
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/objdump.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index b8918de1a59..067e512fc70 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2000-05-24 Alan Modra <alan@linuxcare.com.au>
+
+ * objdump.c (display_target_list): Close the bfd.
+ (display_info_table): Likewise.
+
2000-05-23 Philip Blundell <pb@futuretv.com>
* configure.in: Set version to 2.10.
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 9ad722bb44a..97975054a4b 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -2651,6 +2651,7 @@ display_target_list ()
{
if (bfd_get_error () != bfd_error_invalid_operation)
nonfatal (p->name);
+ bfd_close (abfd);
continue;
}
@@ -2658,6 +2659,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);
@@ -2725,6 +2727,8 @@ display_info_table (first, last)
putchar ('-');
putchar (' ');
}
+ if (abfd != NULL)
+ bfd_close (abfd);
}
putchar ('\n');
}