0000589: Some files are not properly closed

This commit is contained in:
wmayer 2012-02-07 14:20:22 +01:00
parent ab2d4bb2b2
commit a592f55473

View File

@ -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
}