]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix some memory leak 22240/head
authorYan, Zheng <zyan@redhat.com>
Fri, 25 May 2018 08:11:30 +0000 (16:11 +0800)
committerYan, Zheng <zyan@redhat.com>
Tue, 29 May 2018 02:18:34 +0000 (10:18 +0800)
Fixes: http://tracker.ceph.com/issues/24289
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
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 6de085257903680f5661686b65c25dbcc339100b..9e994fffc7fea9c70c1fc7868b771764836b7485 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 080bc0db0ba7b5a339898fa270165989c82f4ef1..9a0aebeef2b26ea5fe69f68c9e5941a930d29c79 100644 (file)
@@ -2005,6 +2005,7 @@ void Server::handle_slave_request(MMDSSlaveRequest *m)
       } else {
        mdcache->request_finish(mdr);
       }
+      m->put();
       return;
     }
   }