From 8dafb23516ebc6a19c035f52d1010fe3eae2ae52 Mon Sep 17 00:00:00 2001 From: "Adam C. Emerson" Date: Mon, 20 Nov 2017 16:10:13 -0500 Subject: [PATCH] mgr: Call _list_modules under with_val Avoid a temporary heap allocation. Signed-off-by: Adam C. Emerson --- src/mgr/PyModuleRegistry.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mgr/PyModuleRegistry.cc b/src/mgr/PyModuleRegistry.cc index ff1d6a95185d7..ed32cf7604191 100644 --- a/src/mgr/PyModuleRegistry.cc +++ b/src/mgr/PyModuleRegistry.cc @@ -481,6 +481,6 @@ static void _list_modules( void PyModuleRegistry::list_modules(std::set *modules) { - _list_modules(g_conf->get_val("mgr_module_path"), modules); + g_conf->with_val("mgr_module_path", + &_list_modules, modules); } - -- 2.39.5