aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre@debian.org>2017-06-30 14:17:54 +0000
committerSylvestre Ledru <sylvestre@gcc.gnu.org>2017-06-30 14:17:54 +0000
commit367e91e1c5c293da8d0999cb2bc5d8cd2c95e6b4 (patch)
treefb0c96087a760a5baed31d5fc9b23d97a7c4354d
parentaaa587d46d4bf67cda5c8b4b41a53eb1b32aed68 (diff)
downloadgcc-367e91e1c5c293da8d0999cb2bc5d8cd2c95e6b4.zip
gcc-367e91e1c5c293da8d0999cb2bc5d8cd2c95e6b4.tar.gz
gcc-367e91e1c5c293da8d0999cb2bc5d8cd2c95e6b4.tar.bz2
* lto-wrapper.c (copy_file) Close both file descriptors before
exiting normally. From-SVN: r249841
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/lto-wrapper.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d6a709b..84a9399 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2017-06-30 Sylvestre Ledru <sylvestre@debian.org>
+
+ * lto-wrapper.c (copy_file) Close both file descriptors before
+ exiting normally.
+
2017-06-30 Martin Liska <mliska@suse.cz>
PR ipa/81214
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index 4b86f93..832ffde 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -838,6 +838,8 @@ copy_file (const char *dest, const char *src)
fatal_error (input_location, "writing output file");
}
}
+ fclose (d);
+ fclose (s);
}
/* Find the crtoffloadtable.o file in LIBRARY_PATH, make copy and pass name of