From: xie xingguo Date: Fri, 26 May 2017 09:28:55 +0000 (+0800) Subject: common/ceph_context: fix leak of registered commands on exit X-Git-Tag: v12.1.0~57^2~22^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9939d5a819d40b051c882e421433c7dfce628fec;p=ceph.git common/ceph_context: fix leak of registered commands on exit By unregister them properly. Also rearrange commands order to keep pace with register process. Signed-off-by: xie xingguo --- diff --git a/src/common/ceph_context.cc b/src/common/ceph_context.cc index e259b28feed44..fd5bf182c6d06 100644 --- a/src/common/ceph_context.cc +++ b/src/common/ceph_context.cc @@ -642,11 +642,13 @@ CephContext::~CephContext() delete _plugin_registry; _admin_socket->unregister_command("perfcounters_dump"); - _admin_socket->unregister_command("perf dump"); _admin_socket->unregister_command("1"); + _admin_socket->unregister_command("perf dump"); _admin_socket->unregister_command("perfcounters_schema"); - _admin_socket->unregister_command("perf schema"); + _admin_socket->unregister_command("perf histogram dump"); _admin_socket->unregister_command("2"); + _admin_socket->unregister_command("perf schema"); + _admin_socket->unregister_command("perf histogram schema"); _admin_socket->unregister_command("perf reset"); _admin_socket->unregister_command("config show"); _admin_socket->unregister_command("config set");