Close opened files when reading an STL file.

This commit is contained in:
Antonio 2021-02-08 23:03:37 +01:00
parent 001a01b386
commit abb29e7300
1 changed files with 2 additions and 0 deletions

View File

@ -140,6 +140,7 @@ static bool IsSTLColored(const char * filename, bool &coloredFlag, bool &magicsM
} }
} }
fclose(fp);
return true; return true;
} }
@ -163,6 +164,7 @@ static bool IsSTLBinary(const char * filename, bool &binaryFlag)
if(file_size == expected_file_size) if(file_size == expected_file_size)
{ {
binaryFlag = true; binaryFlag = true;
fclose(fp);
return true; return true;
} }