]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/Timer.h: ~SafeTimer needs to be virtual
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 30 May 2017 09:29:42 +0000 (11:29 +0200)
committerKefu Chai <kchai@redhat.com>
Sat, 2 Sep 2017 04:27:16 +0000 (12:27 +0800)
Fix for:

CID 1396232 (#1 of 1): Non-virtual destructor (VIRTUAL_DTOR)
 nonvirtual_dtor: Class librbd::<unnamed>::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 <danny.al-gaaf@bisect.de>
src/common/Timer.h

index 8fd478a9934999d4bbee05ef8bf26a44f1113178..e6ce1c1fbdd3f141f5007d1e8533b73fe11e8064 100644 (file)
@@ -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.
    *