diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-01-18 19:24:02 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-01-18 20:05:30 +0100 |
commit | 6012967c4746095e6f66a142cb9f639544c17377 (patch) | |
tree | 3388f969b65a5f9c3388bde027b6c6c08b1af6c8 /src/test/net_tests.cpp | |
parent | b0b57a17306a7e963a4fe463f84e2b150a00a859 (diff) | |
parent | 82e8baab3caaadb1d923d1332c577fb91b9c5747 (diff) | |
download | bitcoin-6012967c4746095e6f66a142cb9f639544c17377.tar.xz |
Merge #9512: Fix various things -fsanitize complains about
82e8baa Avoid boost dynamic_bitset in rest_getutxos (Pieter Wuille)
99f001e Fix memory leak in multiUserAuthorized (Pieter Wuille)
5a0b7e4 Fix memory leak in net_tests (Pieter Wuille)
6b03bfb Fix memory leak in wallet tests (Pieter Wuille)
f94f3e0 Avoid integer overflows in scriptnum tests (Pieter Wuille)
843c560 Avoid unaligned access in crypto i/o (Pieter Wuille)
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 0bd7869f32..b9ed4952bb 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); } |