From: Yan, Zheng Date: Fri, 25 May 2018 08:11:30 +0000 (+0800) Subject: mds: fix some memory leak X-Git-Tag: v14.0.1~1247^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F22240%2Fhead;p=ceph.git mds: fix some memory leak Fixes: http://tracker.ceph.com/issues/24289 Signed-off-by: "Yan, Zheng" --- 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; } }