summaryrefslogtreecommitdiffstats
path: root/providers/implementations/ciphers/cipher_chacha20.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-06-23 16:47:31 +0100
committerMatt Caswell <matt@openssl.org>2020-07-06 09:26:09 +0100
commit63ee6ec17714f5446a3656083e438ec941bdd542 (patch)
tree7b9bf4414eea1eb243b5aed8cda9b27f29c24bb9 /providers/implementations/ciphers/cipher_chacha20.c
parentf29dbb08668318b84d7bca0bd63c585e0169545e (diff)
Ensure any allocated MAC is freed in the provider code
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/12288)
Diffstat (limited to 'providers/implementations/ciphers/cipher_chacha20.c')
-rw-r--r--providers/implementations/ciphers/cipher_chacha20.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/providers/implementations/ciphers/cipher_chacha20.c b/providers/implementations/ciphers/cipher_chacha20.c
index 45571180c8..6759b0e0f9 100644
--- a/providers/implementations/ciphers/cipher_chacha20.c
+++ b/providers/implementations/ciphers/cipher_chacha20.c
@@ -55,6 +55,7 @@ static void chacha20_freectx(void *vctx)
PROV_CHACHA20_CTX *ctx = (PROV_CHACHA20_CTX *)vctx;
if (ctx != NULL) {
+ cipher_generic_reset_ctx((PROV_CIPHER_CTX *)vctx);
OPENSSL_clear_free(ctx, sizeof(*ctx));
}
}