From abb29e730026783b72869be6330826da5f6c8376 Mon Sep 17 00:00:00 2001 From: Antonio Date: Mon, 8 Feb 2021 23:03:37 +0100 Subject: [PATCH] Close opened files when reading an STL file. --- wrap/io_trimesh/import_stl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wrap/io_trimesh/import_stl.h b/wrap/io_trimesh/import_stl.h index 90510e9d..31c9739f 100644 --- a/wrap/io_trimesh/import_stl.h +++ b/wrap/io_trimesh/import_stl.h @@ -140,6 +140,7 @@ static bool IsSTLColored(const char * filename, bool &coloredFlag, bool &magicsM } } + fclose(fp); return true; } @@ -163,6 +164,7 @@ static bool IsSTLBinary(const char * filename, bool &binaryFlag) if(file_size == expected_file_size) { binaryFlag = true; + fclose(fp); return true; }