diff options
| author | Pieter Wuille <[email protected]> | 2017-01-10 14:47:04 -0800 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2017-01-12 11:52:53 -0800 |
| commit | 5a0b7e4106bc97a7a67bda6bf6fbd7f26d892420 (patch) | |
| tree | 3ebfc0104816ed8fb196abc8a0057a15254fd4dd /src/test/net_tests.cpp | |
| parent | Fix memory leak in wallet tests (diff) | |
| download | discoin-5a0b7e4106bc97a7a67bda6bf6fbd7f26d892420.tar.xz discoin-5a0b7e4106bc97a7a67bda6bf6fbd7f26d892420.zip | |
Fix memory leak in net_tests
Diffstat (limited to 'src/test/net_tests.cpp')
| -rw-r--r-- | src/test/net_tests.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/net_tests.cpp b/src/test/net_tests.cpp index 0bd7869f3..b9ed4952b 100644 --- a/src/test/net_tests.cpp +++ b/src/test/net_tests.cpp @@ -162,12 +162,12 @@ BOOST_AUTO_TEST_CASE(cnode_simple_test) bool fInboundIn = false; // Test that fFeeler is false by default. - CNode* pnode1 = new CNode(id++, NODE_NETWORK, height, hSocket, addr, 0, 0, pszDest, fInboundIn); + std::unique_ptr<CNode> pnode1(new CNode(id++, NODE_NETWORK, height, hSocket, addr, 0, 0, pszDest, fInboundIn)); BOOST_CHECK(pnode1->fInbound == false); BOOST_CHECK(pnode1->fFeeler == false); fInboundIn = true; - CNode* pnode2 = new CNode(id++, NODE_NETWORK, height, hSocket, addr, 1, 1, pszDest, fInboundIn); + std::unique_ptr<CNode> pnode2(new CNode(id++, NODE_NETWORK, height, hSocket, addr, 1, 1, pszDest, fInboundIn)); BOOST_CHECK(pnode2->fInbound == true); BOOST_CHECK(pnode2->fFeeler == false); } |