mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-24 06:08:14 +00:00
Fix wrong conditional in free() functions
This commit is contained in:
parent
e463c42902
commit
236ea16c01
2 changed files with 2 additions and 2 deletions
|
@ -108,7 +108,7 @@ void mbedtls_chachapoly_init( mbedtls_chachapoly_context *ctx )
|
||||||
|
|
||||||
void mbedtls_chachapoly_free( mbedtls_chachapoly_context *ctx )
|
void mbedtls_chachapoly_free( mbedtls_chachapoly_context *ctx )
|
||||||
{
|
{
|
||||||
if( ctx != NULL )
|
if( ctx == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mbedtls_chacha20_free( &ctx->chacha20_ctx );
|
mbedtls_chacha20_free( &ctx->chacha20_ctx );
|
||||||
|
|
|
@ -289,7 +289,7 @@ void mbedtls_poly1305_init( mbedtls_poly1305_context *ctx )
|
||||||
|
|
||||||
void mbedtls_poly1305_free( mbedtls_poly1305_context *ctx )
|
void mbedtls_poly1305_free( mbedtls_poly1305_context *ctx )
|
||||||
{
|
{
|
||||||
if( ctx != NULL )
|
if( ctx == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mbedtls_platform_zeroize( ctx, sizeof( mbedtls_poly1305_context ) );
|
mbedtls_platform_zeroize( ctx, sizeof( mbedtls_poly1305_context ) );
|
||||||
|
|
Loading…
Reference in a new issue