aboutsummaryrefslogtreecommitdiff
path: root/src/test/miner_tests.cpp
diff options
context:
space:
mode:
authorGavin Andresen <[email protected]>2013-09-18 16:01:16 -0700
committerGavin Andresen <[email protected]>2013-09-18 16:01:16 -0700
commit623518e1153a59ddb2d4cb168b94894527c6919d (patch)
treef42611591e4fdae79a83af7ad9fcdf297fdf8720 /src/test/miner_tests.cpp
parentconfigure.ac: remove unneeded OSX flags (diff)
parentFix minor unit test memory leaks (diff)
downloaddiscoin-623518e1153a59ddb2d4cb168b94894527c6919d.tar.xz
discoin-623518e1153a59ddb2d4cb168b94894527c6919d.zip
Merge pull request #3017 from sipa/unitleaks
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 818350414..eeeacb0ad 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)