From 9939d5a819d40b051c882e421433c7dfce628fec Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Fri, 26 May 2017 17:28:55 +0800 Subject: [PATCH] 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 --- src/common/ceph_context.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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"); -- 2.39.5