From a96cbe0183d36a1ffc4d17ff5acfb35e74231388 Mon Sep 17 00:00:00 2001 From: Alexander Fasching Date: Wed, 4 Feb 2026 19:42:44 +0100 Subject: [PATCH] Close opened directory (#5529) --- src/rcore.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rcore.c b/src/rcore.c index 4cae00f01..26a394131 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -3004,6 +3004,7 @@ unsigned int GetDirectoryFileCountEx(const char *basePath, const char *filter, b } } } + closedir(dir); } else TRACELOG(LOG_WARNING, "FILEIO: Directory cannot be opened (%s)", basePath); // Maybe it's a file... return fileCounter;