]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/MDSRank.h: make destructor protected 11651/head
authorMichal Jarzabek <stiopa@gmail.com>
Tue, 25 Oct 2016 19:21:05 +0000 (20:21 +0100)
committerMichal Jarzabek <stiopa@gmail.com>
Tue, 25 Oct 2016 19:28:09 +0000 (20:28 +0100)
MDSRank class is inherited from, but doesn't have virtual destructor.
Making destructor protected prevents possibility of deleting derived
classes using base class pointer.

Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
src/mds/MDSRank.h

index 2a2ea75b2af1d68b844eff4c566f94e80314ff51..19eab8041076ec67d7ba36c36b850cd62149225d 100644 (file)
@@ -280,8 +280,12 @@ class MDSRank {
         MonClient *monc_,
         Context *respawn_hook_,
         Context *suicide_hook_);
+
+  protected:
     ~MDSRank();
 
+  public:
+
     // Daemon lifetime functions: these guys break the abstraction
     // and call up into the parent MDSDaemon instance.  It's kind
     // of unavoidable: if we want any depth into our calls