diff --git a/src/init.cpp b/src/init.cpp index 5010965a3..bc77f36ad 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -208,6 +208,8 @@ void Shutdown() delete pwalletMain; pwalletMain = NULL; #endif + delete pzcashParams; + pzcashParams = NULL; ECC_Stop(); LogPrintf("%s: done\n", __func__); } diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp index eabceefaf..5c701c5cc 100644 --- a/src/test/test_bitcoin.cpp +++ b/src/test/test_bitcoin.cpp @@ -43,6 +43,7 @@ BasicTestingSetup::BasicTestingSetup() BasicTestingSetup::~BasicTestingSetup() { ECC_Stop(); + delete pzcashParams; } TestingSetup::TestingSetup() diff --git a/src/zcash/GenerateParams.cpp b/src/zcash/GenerateParams.cpp index 5ac3b8e6f..9e27047ab 100644 --- a/src/zcash/GenerateParams.cpp +++ b/src/zcash/GenerateParams.cpp @@ -22,5 +22,7 @@ int main(int argc, char **argv) p->saveProvingKey(pkFile); p->saveVerifyingKey(vkFile); + delete p; + return 0; } diff --git a/src/zcash/JoinSplit.cpp b/src/zcash/JoinSplit.cpp index 71c1ae0ad..acec69e0e 100644 --- a/src/zcash/JoinSplit.cpp +++ b/src/zcash/JoinSplit.cpp @@ -72,6 +72,9 @@ public: boost::optional> vk; boost::optional pkPath; + JoinSplitCircuit() {} + ~JoinSplitCircuit() {} + static void initialize() { LOCK(cs_InitializeParams); @@ -122,8 +125,6 @@ public: vk = keypair.vk; } - JoinSplitCircuit() {} - bool verify( const ZCProof& proof, const uint256& pubKeyHash, diff --git a/src/zcash/JoinSplit.hpp b/src/zcash/JoinSplit.hpp index 1b655728d..df883bf95 100644 --- a/src/zcash/JoinSplit.hpp +++ b/src/zcash/JoinSplit.hpp @@ -45,6 +45,8 @@ public: template class JoinSplit { public: + virtual ~JoinSplit() {} + static JoinSplit* Generate(); static JoinSplit* Unopened(); static uint256 h_sig(const uint256& randomSeed,