From ef5826187cd2cecbcb3b698c254b6f027ae7e155 Mon Sep 17 00:00:00 2001 From: chaoyli Date: Tue, 9 Jul 2019 16:40:35 +0800 Subject: [PATCH] Add closedir() after opendir() --- be/src/olap/data_dir.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/be/src/olap/data_dir.cpp b/be/src/olap/data_dir.cpp index 9cc81ecac9321c..ec94e13cb09451 100755 --- a/be/src/olap/data_dir.cpp +++ b/be/src/olap/data_dir.cpp @@ -132,6 +132,8 @@ Status DataDir::_check_path_exist() { closedir(dirp); return Status::InternalError("readdir failed"); } + // opendir and closedir should be called both or not. + closedir(dirp); return Status::OK(); }