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 27b1099027f928..a463f120e8b50a 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