mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 09:46:52 -05:00
Fix memory leak in context unit test
Before fix, `valgrind ./tests 1` outputs ==21959== in use at exit: 2,228,288 bytes in 8 blocks after: ==23974== in use at exit: 0 bytes in 0 blocks
This commit is contained in:
parent
14aacdc5e5
commit
5c2a4fad1c
1 changed files with 6 additions and 0 deletions
|
@ -142,6 +142,12 @@ void run_context_tests(void) {
|
||||||
/* try verifying */
|
/* try verifying */
|
||||||
CHECK(secp256k1_ecdsa_sig_verify(&vrfy->ecmult_ctx, &sig, &pub, &msg));
|
CHECK(secp256k1_ecdsa_sig_verify(&vrfy->ecmult_ctx, &sig, &pub, &msg));
|
||||||
CHECK(secp256k1_ecdsa_sig_verify(&both->ecmult_ctx, &sig, &pub, &msg));
|
CHECK(secp256k1_ecdsa_sig_verify(&both->ecmult_ctx, &sig, &pub, &msg));
|
||||||
|
|
||||||
|
/* cleanup */
|
||||||
|
secp256k1_context_destroy(none);
|
||||||
|
secp256k1_context_destroy(sign);
|
||||||
|
secp256k1_context_destroy(vrfy);
|
||||||
|
secp256k1_context_destroy(both);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** HASH TESTS *****/
|
/***** HASH TESTS *****/
|
||||||
|
|
Loading…
Add table
Reference in a new issue