From 86ed04df82ed7360221e421d691aced1efbedb90 Mon Sep 17 00:00:00 2001 From: Rafael Avila de Espindola Date: Fri, 30 Oct 2009 18:29:37 +0000 Subject: [PATCH] re PR lto/41871 (lto-plugin gives: could not open/create temporary file) 2009-10-30 Rafael Avila de Espindola PR41871 * lto-plugin.c (claim_file_handler): Close files that we created. From-SVN: r153764 --- lto-plugin/ChangeLog | 5 +++++ lto-plugin/lto-plugin.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog index fd2d7169966..3342979bc6e 100644 --- a/lto-plugin/ChangeLog +++ b/lto-plugin/ChangeLog @@ -1,3 +1,8 @@ +2009-10-30 Rafael Avila de Espindola + + PR41871 + * lto-plugin.c (claim_file_handler): Close files that we created. + 2009-10-28 Rafael Avila de Espindola * lto-plugin.c (all_symbols_read_handler): Use LDPL_FATAL instead of 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; }