Home GnuPG

Fix memory leaks in tests

Description

Fix memory leaks in tests

* tests/aeswrap.c (check_one_with_padding): Free hd on error paths
* tests/basic.c (check_ccm_cipher): Free context on error paths
  (check_ocb_cipher_checksum): Ditto.
  (do_check_xts_cipher): Ditto.
  (check_gost28147_cipher_basic): Ditto.
* tests/bench-slope.c (bench_ecc_init): Free memory on invalid input.
* tests/t-cv25519.c (test_it): Free memory on error path
* tests/t-dsa.c (hex2buffer): Free memory on error path
* tests/t-ecdsa.c (hex2buffer): Free memory on error path
  (one_test_sexp): Cleanup memory on exit
* tests/t-mpi-point.c (check_ec_mul): Free memory on error
  (check_ec_mul_reduction): Ditto
* tests/t-rsa-15.c (hex2buffer): Ditto
* tests/t-rsa-pss.c (hex2buffer): Ditto
* tests/t-x448.c (test_it): Free memory on error path
* tests/testdrv.c (my_spawn): Free memory on error paths
  • GnuPG-bug-id: T5973
  • Signed-off-by: Jakub Jelen <jjelen@redhat.com>

Details

Provenance
JakujeAuthored on May 11 2022, 3:06 PM
gniibeCommitted on May 31 2022, 8:22 AM
Parents
rCca2afc9fb64d: cipher: Allow verification of small RSA signatures in FIPS mode
Branches
Unknown
Tags
Unknown
Tasks
T5973: libgcrypt: Minor test issues reported by coverity