aboutsummaryrefslogtreecommitdiff
path: root/src/test/miner_tests.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2013-09-19 00:01:36 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2013-09-19 00:01:46 +0200
commit1657ed2ab4e4b50e878570d2e2a5f84829192a14 (patch)
treef42611591e4fdae79a83af7ad9fcdf297fdf8720 /src/test/miner_tests.cpp
parent2e9c8aed310bb90b607954f3b0d5135545f55a10 (diff)
Fix minor unit test memory leaks
Diffstat (limited to 'src/test/miner_tests.cpp')
-rw-r--r--src/test/miner_tests.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp
index 8183504147..eeeacb0ad4 100644
--- a/src/test/miner_tests.cpp
+++ b/src/test/miner_tests.cpp
@@ -83,6 +83,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
// Just to make sure we can still make simple blocks
BOOST_CHECK(pblocktemplate = CreateNewBlockWithKey(reservekey));
+ delete pblocktemplate;
// block sigops > limit: 1000 CHECKMULTISIG + 1
tx.vin.resize(1);
@@ -200,6 +201,9 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
BOOST_CHECK(pblocktemplate = CreateNewBlockWithKey(reservekey));
delete pblocktemplate;
pindexBest->nHeight = nHeight;
+
+ BOOST_FOREACH(CTransaction *tx, txFirst)
+ delete tx;
}
BOOST_AUTO_TEST_CASE(sha256transform_equality)