From: Danny Al-Gaaf Date: Tue, 30 May 2017 09:29:42 +0000 (+0200) Subject: common/Timer.h: ~SafeTimer needs to be virtual X-Git-Tag: v13.0.1~1052^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e014231cd4142427f892ce2059ba8a7757fb0626;p=ceph-ci.git common/Timer.h: ~SafeTimer needs to be virtual Fix for: CID 1396232 (#1 of 1): Non-virtual destructor (VIRTUAL_DTOR) nonvirtual_dtor: Class librbd::::SafeTimerSingleton has a destructor and a pointer to it is upcast to class SafeTimer which doesn't have a virtual destructor. Signed-off-by: Danny Al-Gaaf --- diff --git a/src/common/Timer.h b/src/common/Timer.h index 8fd478a9934..e6ce1c1fbdd 100644 --- a/src/common/Timer.h +++ b/src/common/Timer.h @@ -57,7 +57,7 @@ public: * setting safe_callbacks = false eliminates the lock cycle issue. * */ SafeTimer(CephContext *cct, Mutex &l, bool safe_callbacks=true); - ~SafeTimer(); + virtual ~SafeTimer(); /* Call with the event_lock UNLOCKED. *