aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-08-03 16:33:04 +0000
committerTom Tromey <tromey@redhat.com>2012-08-03 16:33:04 +0000
commita442b35f3a2d2c5ad8afe84f577a1f5c5c1aad60 (patch)
treee0793478e05143588730ce20cc407cc712ce28be
parent0eae2cf456a2892fe4f5eec650fad304983187d2 (diff)
downloadgdb-a442b35f3a2d2c5ad8afe84f577a1f5c5c1aad60.zip
gdb-a442b35f3a2d2c5ad8afe84f577a1f5c5c1aad60.tar.gz
gdb-a442b35f3a2d2c5ad8afe84f577a1f5c5c1aad60.tar.bz2
* dlltool.c (scan_obj_file): Close arfile after calling
bfd_openr_next_archived_file.
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/dlltool.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 7594bcb..9141b86 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2012-08-03 Tom Tromey <tromey@redhat.com>
+
+ * dlltool.c (scan_obj_file): Close arfile after calling
+ bfd_openr_next_archived_file.
+
2012-08-02 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/14420
diff --git a/binutils/dlltool.c b/binutils/dlltool.c
index 6ed0f7a..8d458d7 100644
--- a/binutils/dlltool.c
+++ b/binutils/dlltool.c
@@ -1694,10 +1694,12 @@ scan_obj_file (const char *filename)
bfd *arfile = bfd_openr_next_archived_file (f, 0);
while (arfile)
{
+ bfd *next;
if (bfd_check_format (arfile, bfd_object))
scan_open_obj_file (arfile);
+ next = bfd_openr_next_archived_file (f, arfile);
bfd_close (arfile);
- arfile = bfd_openr_next_archived_file (f, arfile);
+ arfile = next;
}
#ifdef DLLTOOL_MCORE_ELF