mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
test: Plug memory leaks and stack-use-after-scope
This commit is contained in:
parent
27c59dc502
commit
fadb39ca62
3 changed files with 13 additions and 9 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue