Fix most of memory leaks in tests code
* tests/basic.c (check_ccm_cipher): Close cipher after use. * tests/basic.c (check_one_cipher): Correct length of used buffer. * tests/benchmark.c (cipher_bench): Use xcalloc to make buffer initialized. * tests/keygen.c (check_ecc_keys): Release generated key. * tests/t-mpi-point.c (context_param): Release mpi Q. * tests/t-sexp.c (check_extract_param): Release extracted number.
The only remaining reported memory leak is one expected leak from
mpitests.c.
(cherry picked from commit 5c150ece094bf0a504a111ce6c7b72e8d0b0457a)
- Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>