From 8f9a40e1b03bc5e824fa4ff29009a6a10bbc2e9e Mon Sep 17 00:00:00 2001 From: random-zebra Date: Thu, 11 Feb 2021 03:32:08 +0100 Subject: [PATCH] [BUG] Add proper virtual dtor for CActiveDeterministicMasternodeManager --- src/activemasternode.h | 1 + src/init.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/activemasternode.h b/src/activemasternode.h index b076b4b0f88049..1990b94fad4560 100644 --- a/src/activemasternode.h +++ b/src/activemasternode.h @@ -53,6 +53,7 @@ class CActiveDeterministicMasternodeManager : public CValidationInterface CActiveMasternodeInfo info; public: + virtual ~CActiveDeterministicMasternodeManager() = default; virtual void UpdatedBlockTip(const CBlockIndex* pindexNew, const CBlockIndex* pindexFork, bool fInitialDownload); void Init(); diff --git a/src/init.cpp b/src/init.cpp index 83bbd9485b34b3..ed166709395898 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -318,6 +318,8 @@ void PrepareShutdown() if (activeMasternodeManager) { UnregisterValidationInterface(activeMasternodeManager); + delete activeMasternodeManager; + activeMasternodeManager = nullptr; } #if ENABLE_ZMQ