From: Yan, Zheng Date: Fri, 25 May 2018 08:11:30 +0000 (+0800) Subject: mds: fix some memory leak X-Git-Tag: v12.2.6~69^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f1304670d79bd8ce1351872cd0decd15c5b42078;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 ea59c57b827..e94390f65bf 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 1e2a3a302f6..f1ccdd898a6 100644 --- a/src/mds/Migrator.cc +++ b/src/mds/Migrator.cc @@ -3326,8 +3326,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); C_M_LoggedImportCaps *finish = new C_M_LoggedImportCaps( diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 5132ece9e57..04a85d26738 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -1959,6 +1959,7 @@ void Server::handle_slave_request(MMDSSlaveRequest *m) } else { mdcache->request_finish(mdr); } + m->put(); return; } }