aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_bitcoin.cpp
diff options
context:
space:
mode:
authorMarcoFalke <[email protected]>2018-02-17 14:29:56 -0500
committerMarcoFalke <[email protected]>2018-02-22 14:53:14 -0500
commitfadb39ca6237781346ca3da319e2bd9e48a5a604 (patch)
tree1f441104a6e3bd684d1a7c1e3669b07615a437f0 /src/test/test_bitcoin.cpp
parentMerge #12464: Revert "[tests] bind functional test nodes to 127.0.0.1" (diff)
downloaddiscoin-fadb39ca6237781346ca3da319e2bd9e48a5a604.tar.xz
discoin-fadb39ca6237781346ca3da319e2bd9e48a5a604.zip
test: Plug memory leaks and stack-use-after-scope
Diffstat (limited to 'src/test/test_bitcoin.cpp')
-rw-r--r--src/test/test_bitcoin.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index bdd44489f..95c4825b8 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -28,6 +28,9 @@ void CConnmanTest::AddNode(CNode& node)
void CConnmanTest::ClearNodes()
{
LOCK(g_connman->cs_vNodes);
+ for (CNode* node : g_connman->vNodes) {
+ delete node;
+ }
g_connman->vNodes.clear();
}