diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 216fc81179..21b3bd0904 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -482,6 +482,7 @@ void StopHTTPServer() workQueue->WaitExit(); #endif delete workQueue; + workQueue = nullptr; } if (eventBase) { LogPrint("http", "Waiting for HTTP event thread to exit\n"); diff --git a/src/qt/test/rpcnestedtests.cpp b/src/qt/test/rpcnestedtests.cpp index 30b9c92330..cacfa5f69d 100644 --- a/src/qt/test/rpcnestedtests.cpp +++ b/src/qt/test/rpcnestedtests.cpp @@ -160,11 +160,13 @@ void RPCNestedTests::rpcNestedTests() pcoinsTip = nullptr; llmq::DestroyLLMQSystem(); delete deterministicMNManager; + deterministicMNManager = nullptr; delete pcoinsdbview; pcoinsdbview = nullptr; delete pblocktree; pblocktree = nullptr; delete evoDb; + evoDb = nullptr; boost::filesystem::remove_all(boost::filesystem::path(path)); } diff --git a/src/test/dbwrapper_tests.cpp b/src/test/dbwrapper_tests.cpp index ca55dccf42..371d103c7d 100644 --- a/src/test/dbwrapper_tests.cpp +++ b/src/test/dbwrapper_tests.cpp @@ -141,6 +141,7 @@ BOOST_AUTO_TEST_CASE(existing_data_no_obfuscate) // Call the destructor to free leveldb LOCK delete dbw; + dbw = nullptr; // Now, set up another wrapper that wants to obfuscate the same directory CDBWrapper odbw(ph, (1 << 10), false, false, true); @@ -182,6 +183,7 @@ BOOST_AUTO_TEST_CASE(existing_data_reindex) // Call the destructor to free leveldb LOCK delete dbw; + dbw = nullptr; // Simulate a -reindex by wiping the existing data store CDBWrapper odbw(ph, (1 << 10), false, true, true);