From ce441fac071698e969a4ec5f067fb9b0f6e60b73 Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Tue, 16 Apr 2013 09:15:35 +0200 Subject: [PATCH] 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. --- Source/cmCoreTryCompile.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 387f6ed5b..9f38b2529 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -326,6 +326,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector const& argv) { this->Makefile->IssueMessage(cmake::FATAL_ERROR, "could not write export file."); + fclose(fout); return -1; } fprintf(fout,