]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/ceph_context: fix leak of registered commands on exit 15302/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Fri, 26 May 2017 09:28:55 +0000 (17:28 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Fri, 26 May 2017 09:28:55 +0000 (17:28 +0800)
By unregister them properly.
Also rearrange commands order to keep pace with register process.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/common/ceph_context.cc

index e259b28feed44290f5ebe258ba7d8c6cdface7de..fd5bf182c6d06a9aad565bd158d7cc8485554942 100644 (file)
@@ -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");