]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/MgrSession: allow ref tracing, and fix ref leak
authorSage Weil <sage@redhat.com>
Wed, 12 Apr 2017 13:58:18 +0000 (09:58 -0400)
committerSage Weil <sage@redhat.com>
Fri, 21 Apr 2017 18:15:09 +0000 (14:15 -0400)
The first RefCountedObj ctor arg is a cct, not a ref count.

Fixes: http://tracker.ceph.com/issues/19591
Signed-off-by: Sage Weil <sage@redhat.com>
src/mgr/DaemonServer.cc
src/mgr/MgrSession.h

index 24b1d2585dcab6ba1c5ba0bfd975ad2c5e781c5d..f54d903dbd214c6260e4367269dc32f9bff85022 100644 (file)
@@ -133,7 +133,7 @@ bool DaemonServer::ms_verify_authorizer(Connection *con,
     return true;
   }
 
-  MgrSessionRef s(new MgrSession);
+  MgrSessionRef s(new MgrSession(cct));
   s->inst.addr = con->get_peer_addr();
   AuthCapsInfo caps_info;
 
index 328871d2ef962945f2b114f1f30c68026b999f79..790d76b8aac49acbdda9f366f8b1aa494e91a211 100644 (file)
@@ -21,7 +21,7 @@ struct MgrSession : public RefCountedObject {
   // mon caps are suitably generic for mgr
   MonCap caps;
 
-  MgrSession() : RefCountedObject(0) {}
+  MgrSession(CephContext *cct) : RefCountedObject(cct, 0) {}
   ~MgrSession() override {}
 };