read_files_in_dir: closedir before return
diff --git a/selfdrive/common/util.cc b/selfdrive/common/util.cc
index 689a6a90bb1098..4d366a0394cc97 100644
--- a/selfdrive/common/util.cc
+++ b/selfdrive/common/util.cc
@@ -83,6 +83,7 @@ int read_files_in_dir(std::string path, std::map<std::string, std::string> *cont
     }
   }
 
+  closedir(d);
   return 0;
 }
 
