]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix some memory leak
authorYan, Zheng <zyan@redhat.com>
Fri, 25 May 2018 08:11:30 +0000 (16:11 +0800)
committerYan, Zheng <zyan@redhat.com>
Wed, 30 May 2018 03:40:06 +0000 (11:40 +0800)
Fixes: http://tracker.ceph.com/issues/24289
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit e7c149b93dc384ee4a2c8250c502548d12535123)

src/mds/Beacon.cc
src/mds/Migrator.cc
src/mds/Server.cc

index 6ed027c071e4c09441b2b9c15eb6d2d0d2754d6b..94cd8ea6fd22248d08e1d088c5e9b2bab2dbca3e 100644 (file)
@@ -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();
 }
 
 
index 3c6019d972e7b1b596d980e464e05a5a7128bc35..b7e1b03ea885f09b070ce4ecf8ff727d63f7ae12 100644 (file)
@@ -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_t,entity_inst_t> client_map;
index 3ecc86eb24f083d2b3f34aca684afda9454455f5..2a10da04d86a58f04878bc10c7bf549dcb42921e 100644 (file)
@@ -2005,6 +2005,7 @@ void Server::handle_slave_request(MMDSSlaveRequest *m)
       } else {
        mdcache->request_finish(mdr);
       }
+      m->put();
       return;
     }
   }