Home GnuPG

Fix most of memory leaks in tests code
48cc151e9a63Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

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>

Details

Provenance
lumagAuthored on Jan 25 2014, 12:21 AM
wernerCommitted on Jan 27 2014, 2:36 PM
Parents
rCa180117d20ec: Fix memory leaks in ecc code
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rC48cc151e9a63: Fix most of memory leaks in tests code (authored by Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>).Jan 27 2014, 2:36 PM