common/Timer.h: ~SafeTimer needs to be virtual

Fix for:

CID 1396232 ( 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>
This commit is contained in:
Danny Al-Gaaf 2017-05-30 11:29:42 +02:00 committed by Kefu Chai
parent 1ec2de3003
commit e014231cd4

View 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.
*