From a592f55473226f5bf91538359516623a0cdfea77 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 7 Feb 2012 14:20:22 +0100 Subject: [PATCH] 0000589: Some files are not properly closed --- src/Base/FileInfo.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Base/FileInfo.cpp b/src/Base/FileInfo.cpp index 63506a2af..8464e24b2 100644 --- a/src/Base/FileInfo.cpp +++ b/src/Base/FileInfo.cpp @@ -176,8 +176,11 @@ std::string FileInfo::getTempFileName(const char* FileName, const char* Path) else std::strcat(buf, "/fileXXXXXX"); - /*int id =*/ (void) mkstemp(buf); - //FILE* file = fdopen(id, "w"); + int id = (void) mkstemp(buf); + if (id > -1) { + FILE* file = fdopen(id, "w"); + fclose(file); + } return std::string(buf); #endif }