]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix leaked MDCache::logger 3598/head
authorJohn Spray <john.spray@redhat.com>
Tue, 3 Feb 2015 11:19:59 +0000 (11:19 +0000)
committerJohn Spray <john.spray@redhat.com>
Tue, 3 Feb 2015 13:10:04 +0000 (14:10 +0100)
Fixes: #10720
Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/MDCache.cc

index aa866972ef73b679d836cdd911b5f0711e1fa365..867e192e990034a7a9ea1cd081bbd1aad00f7a7c 100644 (file)
@@ -167,6 +167,7 @@ public:
 
 
 MDCache::MDCache(MDS *m) :
+  logger(0),
   num_strays(0),
   num_strays_purging(0),
   num_strays_delayed(0),
@@ -219,6 +220,11 @@ MDCache::MDCache(MDS *m) :
 MDCache::~MDCache() 
 {
   delete migrator;
+  if (logger) {
+    g_ceph_context->get_perfcounters_collection()->remove(logger);
+    delete logger;
+    logger = 0;
+  }
   //delete renamer;
 }