OSDN Git Service

2009-10-30 Rafael Avila de Espindola <espindola@google.com>
authorespindola <espindola@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 30 Oct 2009 18:29:37 +0000 (18:29 +0000)
committerespindola <espindola@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 30 Oct 2009 18:29:37 +0000 (18:29 +0000)
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

lto-plugin/ChangeLog
lto-plugin/lto-plugin.c

index fd2d716..3342979 100644 (file)
@@ -1,3 +1,8 @@
+2009-10-30  Rafael Avila de Espindola  <espindola@google.com>
+
+       PR41871
+       * lto-plugin.c (claim_file_handler): Close files that we created.
+
 2009-10-28  Rafael Avila de Espindola  <espindola@google.com>
 
        * lto-plugin.c (all_symbols_read_handler): Use LDPL_FATAL instead of
 2009-10-28  Rafael Avila de Espindola  <espindola@google.com>
 
        * lto-plugin.c (all_symbols_read_handler): Use LDPL_FATAL instead of
index 3a51441..c92ac06 100644 (file)
@@ -635,6 +635,9 @@ claim_file_handler (const struct ld_plugin_input_file *file, int *claimed)
   if (elf)
     elf_end (elf);
 
   if (elf)
     elf_end (elf);
 
+  if (file->offset != 0)
+    close (lto_file_fd);
+
   return LDPS_OK;
 }
 
   return LDPS_OK;
 }