From c6157741e19f9394d72651bc0b14b962827036ec Mon Sep 17 00:00:00 2001 From: Robert Butts Date: Mon, 3 Jan 2022 14:56:04 -0700 Subject: [PATCH] Port #6816 from core strategy to plugin Ports #6816 fix for core strategies to the parent_select plugin. Fixes a bug with the YAML loading calling opendir but not closedir, which leaked the file descriptor. --- plugins/experimental/parent_select/consistenthash_config.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/experimental/parent_select/consistenthash_config.cc b/plugins/experimental/parent_select/consistenthash_config.cc index 7186ae4c3d9..2016b0438bd 100644 --- a/plugins/experimental/parent_select/consistenthash_config.cc +++ b/plugins/experimental/parent_select/consistenthash_config.cc @@ -201,6 +201,7 @@ loadConfigFile(const std::string &fileName, std::stringstream &doc, std::unorder } } } + closedir(dir); } else { std::ifstream file(fileName); if (file.is_open()) {