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,