diff --git a/osdep/OSUtils.cpp b/osdep/OSUtils.cpp index f98f7e03d..1fa2f8b06 100644 --- a/osdep/OSUtils.cpp +++ b/osdep/OSUtils.cpp @@ -106,6 +106,8 @@ std::map OSUtils::listDirectory(const char *path) r[std::string(dptr->d_name)] = (dptr->d_type == DT_DIR); } else break; } + + closedir(d); #endif return r;