fix memory leaks on todays pushes

This commit is contained in:
toddouska 2014-08-29 15:15:42 -07:00
parent 03800a9df4
commit 658f3ec073
2 changed files with 4 additions and 2 deletions

View File

@ -2338,6 +2338,8 @@ int ecc_import_x963(const byte* in, word32 inLen, ecc_key* key)
}
}
mp_clear(&a);
mp_clear(&b);
mp_clear(&prime);
mp_clear(&t2);
mp_clear(&t1);

View File

@ -4584,6 +4584,7 @@ int ecc_test(void)
for (i = 0; i < times; i++) {
ecc_free(&userA);
ecc_init(&userA);
memset(sig, 0, sizeof(sig));
@ -4612,13 +4613,12 @@ int ecc_test(void)
if (verify != 1)
return -1023 - i;
ecc_free(&userA);
}
}
ecc_free(&pubKey);
ecc_free(&userB);
ecc_free(&userA);
return 0;
}