From: Yan, Zheng Date: Fri, 25 May 2018 08:11:30 +0000 (+0800) Subject: mds: fix some memory leak X-Git-Tag: v13.2.0~1^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b0d9fd07296f48164583bb4f30694181ef777431;p=ceph.git mds: fix some memory leak Fixes: http://tracker.ceph.com/issues/24289 Signed-off-by: "Yan, Zheng" (cherry picked from commit e7c149b93dc384ee4a2c8250c502548d12535123) --- diff --git a/src/mds/Beacon.cc b/src/mds/Beacon.cc index 6ed027c071e4..94cd8ea6fd22 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 3c6019d972e7..b7e1b03ea885 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 3ecc86eb24f0..2a10da04d86a 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; } }