summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2013-04-16 09:15:35 +0200
committerBrad King <brad.king@kitware.com>2013-04-16 08:38:33 -0400
commitce441fac071698e969a4ec5f067fb9b0f6e60b73 (patch)
tree4991d0296c28a42c3eda48917777d0c1a2669375
parent201db269b8c9743bb77fc22ff116f8962dd2f77e (diff)
downloadcmake-ce441fac071698e969a4ec5f067fb9b0f6e60b73.tar.gz
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.
-rw-r--r--Source/cmCoreTryCompile.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index 387f6ed5bc..9f38b2529b 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,