Home GnuPG

Fix memory leaks in tests
735601494adbUnpublished

Unpublished Commit · Learn More

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

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

Cherry-picked from master commit of:
ef2e1523c33c3143b4fee0c00f88a5a0842b337f

  • 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:25 AM
Parents
rC468ffa8f9c47: cipher: Allow verification of small RSA signatures in FIPS mode
Branches
Unknown
Tags
Unknown

Event Timeline