diff options
author | Tom Tromey <tromey@redhat.com> | 2012-08-03 16:33:03 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2012-08-03 16:33:03 +0000 |
commit | cb29c4addd412c067efe84e04ba2a078da514c92 (patch) | |
tree | abfcf63c4ee10de8537ae9336eaef2713563a6ba /binutils/dlltool.c | |
parent | 80e548845a83de34b11849f105190dd39022f054 (diff) | |
download | binutils-redhat-cb29c4addd412c067efe84e04ba2a078da514c92.tar.gz |
* dlltool.c (scan_obj_file): Close arfile after calling
bfd_openr_next_archived_file.
Diffstat (limited to 'binutils/dlltool.c')
-rw-r--r-- | binutils/dlltool.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/binutils/dlltool.c b/binutils/dlltool.c index 6ed0f7a39b..8d458d7646 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 |