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; }