commit | fd42d531ba20f9868397711a3e67d102111c9093 | [log] [tgz] |
---|---|---|
author | k-stachowiak <krzysiek.stachowiak@gmail.com> | Tue Dec 11 14:37:51 2018 +0100 |
committer | Gilles Peskine <Gilles.Peskine@arm.com> | Wed Dec 19 19:02:39 2018 +0100 |
tree | 0d47c42835fc5836a50282b8d84128fb75b3d51d | |
parent | 438448e45fe5082d7123f6dc9d1d61aa7af0ba8f [diff] [blame] |
Explicitly allow NULL as an argument to mbedtls_ccm_free()
diff --git a/library/ccm.c b/library/ccm.c index 4bb3642..ad0d71b 100644 --- a/library/ccm.c +++ b/library/ccm.c
@@ -106,7 +106,8 @@ */ void mbedtls_ccm_free( mbedtls_ccm_context *ctx ) { - CCM_VALIDATE( ctx != NULL ); + if( ctx == NULL ) + return; mbedtls_cipher_free( &ctx->cipher_ctx ); mbedtls_platform_zeroize( ctx, sizeof( mbedtls_ccm_context ) ); }