summaryrefslogtreecommitdiff
path: root/bfd/cache.c
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
commit4584ec69f4b406a3c9e89647e5497bf7f3c6c035 (patch)
tree478f5f96b8daaf7d2f0885dba1e24087b245e2da /bfd/cache.c
parentff13e4c679bb0c0a17704c5867643e854e4efce1 (diff)
downloadbinutils-redhat-4584ec69f4b406a3c9e89647e5497bf7f3c6c035.tar.gz
2004-04-22 Andrew Cagney <cagney@redhat.com>
* cache.c (bfd_cache_close): Check for a previously closed file.
Diffstat (limited to 'bfd/cache.c')
-rw-r--r--bfd/cache.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bfd/cache.c b/bfd/cache.c
index 9146c05cac..0586061286 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);
}