Fix minor unit test memory leaks
This commit is contained in:
parent
2e9c8aed31
commit
1657ed2ab4
@ -83,6 +83,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
|
|||||||
|
|
||||||
// Just to make sure we can still make simple blocks
|
// Just to make sure we can still make simple blocks
|
||||||
BOOST_CHECK(pblocktemplate = CreateNewBlockWithKey(reservekey));
|
BOOST_CHECK(pblocktemplate = CreateNewBlockWithKey(reservekey));
|
||||||
|
delete pblocktemplate;
|
||||||
|
|
||||||
// block sigops > limit: 1000 CHECKMULTISIG + 1
|
// block sigops > limit: 1000 CHECKMULTISIG + 1
|
||||||
tx.vin.resize(1);
|
tx.vin.resize(1);
|
||||||
@ -200,6 +201,9 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
|
|||||||
BOOST_CHECK(pblocktemplate = CreateNewBlockWithKey(reservekey));
|
BOOST_CHECK(pblocktemplate = CreateNewBlockWithKey(reservekey));
|
||||||
delete pblocktemplate;
|
delete pblocktemplate;
|
||||||
pindexBest->nHeight = nHeight;
|
pindexBest->nHeight = nHeight;
|
||||||
|
|
||||||
|
BOOST_FOREACH(CTransaction *tx, txFirst)
|
||||||
|
delete tx;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(sha256transform_equality)
|
BOOST_AUTO_TEST_CASE(sha256transform_equality)
|
||||||
|
@ -289,6 +289,7 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
|
|||||||
BOOST_CHECK_NE(fails, RANDOM_REPEATS);
|
BOOST_CHECK_NE(fails, RANDOM_REPEATS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
empty_wallet();
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_SUITE_END()
|
BOOST_AUTO_TEST_SUITE_END()
|
||||||
|
Loading…
Reference in New Issue
Block a user