diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2014-01-25 03:21:39 +0400 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2014-01-27 14:33:33 +0100 |
commit | 5c150ece094bf0a504a111ce6c7b72e8d0b0457a (patch) | |
tree | e8a5cec45e886448b472eaa9d45990d75ed19c9c /tests/t-sexp.c | |
parent | 6d87e6abdfb7552323a95401f14e6367398a3e5a (diff) | |
download | libgcrypt-5c150ece094bf0a504a111ce6c7b72e8d0b0457a.tar.gz |
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>
Diffstat (limited to 'tests/t-sexp.c')
-rw-r--r-- | tests/t-sexp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/t-sexp.c b/tests/t-sexp.c index ec8b280a..4c482776 100644 --- a/tests/t-sexp.c +++ b/tests/t-sexp.c @@ -1035,6 +1035,7 @@ check_extract_param (void) gcry_log_debugmpi (" got", mpis[0]); } + gcry_free (ioarray[0].data); gcry_mpi_release (mpis[0]); gcry_sexp_release (sxp); |