From b9349a67a937a07719928c8bae158d7d8bd7ecd8 Mon Sep 17 00:00:00 2001 From: Ronald Cron Date: Fri, 26 Mar 2021 13:32:29 +0100 Subject: [PATCH] psa: aead: Add missing chachapoly context free Signed-off-by: Ronald Cron --- library/psa_crypto_aead.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/psa_crypto_aead.c b/library/psa_crypto_aead.c index 57352c473..005dd3320 100644 --- a/library/psa_crypto_aead.c +++ b/library/psa_crypto_aead.c @@ -65,6 +65,11 @@ static void psa_aead_abort_internal( aead_operation_t *operation ) mbedtls_gcm_free( &operation->ctx.gcm ); break; #endif /* MBEDTLS_PSA_BUILTIN_ALG_GCM */ +#if defined(MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305) + case PSA_ALG_CHACHA20_POLY1305: + mbedtls_chachapoly_free( &operation->ctx.chachapoly ); + break; +#endif /* MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305 */ } }