From d2648c74c7228b6bc446b4242fbe1b1430602589 Mon Sep 17 00:00:00 2001 From: SeanLin Date: Mon, 16 Sep 2019 11:29:12 +0800 Subject: [PATCH] Fix image file close issue After file is opened, add fclose to avoid saving buffer data in memory --- src/utils/Image_Utils.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils/Image_Utils.cpp b/src/utils/Image_Utils.cpp index cbe8b33..b44677d 100644 --- a/src/utils/Image_Utils.cpp +++ b/src/utils/Image_Utils.cpp @@ -55,6 +55,8 @@ ImageProperties GetImageProperties(char const* filePath) { if (success && channels == 4 && imageHasTransparentPixels(f)) { result.occlusion = IMAGE_TRANSPARENT; } + + fclose(f); return result; }