From e7c149b93dc384ee4a2c8250c502548d12535123 Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Fri, 25 May 2018 16:11:30 +0800 Subject: [PATCH] mds: fix some memory leak Fixes: http://tracker.ceph.com/issues/24289 Signed-off-by: "Yan, Zheng" --- src/mds/Beacon.cc | 1 + src/mds/Migrator.cc | 5 ++++- src/mds/Server.cc | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mds/Beacon.cc b/src/mds/Beacon.cc index 6ed027c071e4c..94cd8ea6fd222 100644 --- a/src/mds/Beacon.cc +++ b/src/mds/Beacon.cc @@ -142,6 +142,7 @@ void Beacon::handle_mds_beacon(MMDSBeacon *m) dout(10) << "handle_mds_beacon " << ceph_mds_state_name(m->get_state()) << " seq " << m->get_seq() << " dne" << dendl; } + m->put(); } diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index 6de0852579036..9e994fffc7fea 100644 --- a/src/mds/Migrator.cc +++ b/src/mds/Migrator.cc @@ -3344,8 +3344,11 @@ void Migrator::handle_export_caps(MExportCaps *ex) assert(in->is_auth()); // FIXME - if (!in->can_auth_pin()) + if (!in->can_auth_pin()) { + ex->put(); return; + } + in->auth_pin(this); map client_map; diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 080bc0db0ba7b..9a0aebeef2b26 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -2005,6 +2005,7 @@ void Server::handle_slave_request(MMDSSlaveRequest *m) } else { mdcache->request_finish(mdr); } + m->put(); return; } } -- 2.39.5