Fix most of memory leaks in tests code
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Fri, 24 Jan 2014 23:21:39 +0000 (03:21 +0400)
committerWerner Koch <wk@gnupg.org>
Mon, 27 Jan 2014 13:33:33 +0000 (14:33 +0100)
commit5c150ece094bf0a504a111ce6c7b72e8d0b0457a
treee8a5cec45e886448b472eaa9d45990d75ed19c9c
parent6d87e6abdfb7552323a95401f14e6367398a3e5a
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.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
tests/basic.c
tests/benchmark.c
tests/keygen.c
tests/mpitests.c
tests/t-mpi-point.c
tests/t-sexp.c