Fix a memory leak and add a number of small tests.

This fixes a simple copy and paste induced memory leak for the ecdsa init.

The tests are mostly just improving coverage and aren't interesting.
This commit is contained in:
Gregory Maxwell
2014-12-04 01:04:00 -08:00
parent d5e8362ae5
commit ee3eb4be9e
2 changed files with 72 additions and 7 deletions

View File

@@ -48,7 +48,7 @@ static void secp256k1_ecdsa_stop(void) {
if (secp256k1_ecdsa_consts == NULL)
return;
secp256k1_ecdsa_consts_t *c = (secp256k1_ecdsa_consts_t*)secp256k1_ecmult_consts;
secp256k1_ecdsa_consts_t *c = (secp256k1_ecdsa_consts_t*)secp256k1_ecdsa_consts;
secp256k1_ecdsa_consts = NULL;
free(c);
}