summaryrefslogtreecommitdiffstats
path: root/Source/cmCoreTryCompile.cxx
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2013-04-16 07:15:35 (GMT)
committerBrad King <brad.king@kitware.com>2013-04-16 12:38:33 (GMT)
commitce441fac071698e969a4ec5f067fb9b0f6e60b73 (patch)
tree4991d0296c28a42c3eda48917777d0c1a2669375 /Source/cmCoreTryCompile.cxx
parent201db269b8c9743bb77fc22ff116f8962dd2f77e (diff)
downloadCMake-ce441fac071698e969a4ec5f067fb9b0f6e60b73.zip
CMake-ce441fac071698e969a4ec5f067fb9b0f6e60b73.tar.gz
CMake-ce441fac071698e969a4ec5f067fb9b0f6e60b73.tar.bz2
try_compile: add missing fclose() to recently added error case
In commit 236133e7 (Handle targets in the LINK_LIBRARIES of try_compile, 2013-02-09) an error return case was added without closing the file in progress. Add the missing fclose() call. Spotted by sevenhill.
Diffstat (limited to 'Source/cmCoreTryCompile.cxx')
-rw-r--r--Source/cmCoreTryCompile.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index 387f6ed..9f38b25 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -326,6 +326,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
{
this->Makefile->IssueMessage(cmake::FATAL_ERROR,
"could not write export file.");
+ fclose(fout);
return -1;
}
fprintf(fout,