From: Michal Jarzabek Date: Tue, 25 Oct 2016 19:21:05 +0000 (+0100) Subject: mds/MDSRank.h: make destructor protected X-Git-Tag: v11.1.0~278^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=595cd8988d444c9abfd60dfba948cdb57088082b;p=ceph.git mds/MDSRank.h: make destructor protected 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 --- diff --git a/src/mds/MDSRank.h b/src/mds/MDSRank.h index 2a2ea75b2af..19eab804107 100644 --- a/src/mds/MDSRank.h +++ b/src/mds/MDSRank.h @@ -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