summaryrefslogtreecommitdiff
path: root/tests/basic.c
diff options
context:
space:
mode:
authorClemens Lang via Gcrypt-devel <gcrypt-devel@lists.gnupg.org>2022-02-11 16:55:24 +0100
committerNIIBE Yutaka <gniibe@fsij.org>2022-02-14 15:01:25 +0900
commit7fc5d33e74164519edcd8127a35cc21228d2727f (patch)
tree12c019fc7e78231af410c7bbed88a8f7f7807020 /tests/basic.c
parentb7dcb576bc1bb2cc23c29395f0c78c495af971d3 (diff)
downloadlibgcrypt-7fc5d33e74164519edcd8127a35cc21228d2727f.tar.gz
fips: Fix memory leaks in FIPS mode
* cipher/pubkey.c (_gcry_pk_sign_md): Fix memory leak in FIPS mode when used with SHA1 * tests/basic.c (check_one_cipher_core): Add missing free in error code triggered in FIPS mode * tests/dsa-rfc6979.c (check_dsa_rfc6979): Likewise * tests/pubkey.c (check_x931_derived_key): Likewise -- Signed-off-by: Clemens Lang <cllang@redhat.com>
Diffstat (limited to 'tests/basic.c')
-rw-r--r--tests/basic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/basic.c b/tests/basic.c
index 32be7c2f..a0ad33eb 100644
--- a/tests/basic.c
+++ b/tests/basic.c
@@ -11047,6 +11047,7 @@ check_one_cipher_core (int algo, int mode, int flags,
if (!err)
fail ("pass %d, algo %d, mode %d, gcry_cipher_encrypt is expected to "
"fail in FIPS mode: %s\n", pass, algo, mode, gpg_strerror (err));
+ gcry_cipher_close (hd);
goto err_out_free;
}
if (err)