summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-04-22 16:17:31 +0000
committerAndrew Cagney <cagney@redhat.com>2004-04-22 16:17:31 +0000
commitfe2e161ad6d43a9f95c6ecbb0a1e57376632cf94 (patch)
tree4314fbc48f8116c23e5b21c4ccddc4a65282d884
parente5786a5cbf33935ab0c3da91d84a567d9cbdd83e (diff)
downloadbinutils-fe2e161ad6d43a9f95c6ecbb0a1e57376632cf94.tar.gz
binutils-fe2e161ad6d43a9f95c6ecbb0a1e57376632cf94.tar.bz2
binutils-fe2e161ad6d43a9f95c6ecbb0a1e57376632cf94.zip
2004-04-22 Andrew Cagney <cagney@redhat.com>
* cache.c (bfd_cache_close): Check for a previously closed file.
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/cache.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 8ab0844e40c..904f0b8e823 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2004-04-22 Andrew Cagney <cagney@redhat.com>
+
+ * cache.c (bfd_cache_close): Check for a previously closed file.
+
2004-04-22 Jakub Jelinek <jakub@redhat.com>
* bfd.c (bfd_get_synthetic_symtab): Define.
diff --git a/bfd/cache.c b/bfd/cache.c
index 9146c05caca..0586061286a 100644
--- a/bfd/cache.c
+++ b/bfd/cache.c
@@ -336,6 +336,10 @@ bfd_cache_close (bfd *abfd)
if (abfd->iovec != &cache_iovec)
return TRUE;
+ if (abfd->iostream == NULL)
+ /* Previously closed. */
+ return TRUE;
+
return bfd_cache_delete (abfd);
}