summaryrefslogtreecommitdiff
path: root/lto-plugin/lto-plugin.c
diff options
context:
space:
mode:
authorespindola <espindola@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-30 18:29:37 +0000
committerespindola <espindola@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-30 18:29:37 +0000
commit57f30d5ef3b947702aa3a2ebef32af1f9886b236 (patch)
tree68d0b283fd822d6c677e932f928eaec36a8b35f9 /lto-plugin/lto-plugin.c
parentf875e13a4173c33fae2d502c8ca8884da50eba76 (diff)
downloadgcc-57f30d5ef3b947702aa3a2ebef32af1f9886b236.tar.gz
2009-10-30 Rafael Avila de Espindola <espindola@google.com>
PR41871 * lto-plugin.c (claim_file_handler): Close files that we created. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153764 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'lto-plugin/lto-plugin.c')
-rw-r--r--lto-plugin/lto-plugin.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lto-plugin/lto-plugin.c b/lto-plugin/lto-plugin.c
index 3a51441c433..c92ac06cf2d 100644
--- a/lto-plugin/lto-plugin.c
+++ b/lto-plugin/lto-plugin.c
@@ -635,6 +635,9 @@ claim_file_handler (const struct ld_plugin_input_file *file, int *claimed)
if (elf)
elf_end (elf);
+ if (file->offset != 0)
+ close (lto_file_fd);
+
return LDPS_OK;
}