Skip to content

Commit

Permalink
mgr/ActivePyModules: handle_command - fix broken lock
Browse files Browse the repository at this point in the history
by unlocking properly when module is not available.

Fixes: http://tracker.ceph.com/issues/39235
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
(cherry picked from commit 377de7a)
  • Loading branch information
xiexingguo authored and Prashant D committed May 3, 2019
1 parent f5edf3b commit 274df23
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/mgr/ActivePyModules.cc
Expand Up @@ -912,6 +912,7 @@ int ActivePyModules::handle_command(
auto mod_iter = modules.find(module_name);
if (mod_iter == modules.end()) {
*ss << "Module '" << module_name << "' is not available";
lock.Unlock();
return -ENOENT;
}

Expand Down

0 comments on commit 274df23

Please sign in to comment.