mirror of
https://github.com/espressif/mbedtls.git
synced 2026-10-10 11:07:23 +00:00
Fix zeroization at NULL pointer
Signed-off-by: Dave Rodgman <[email protected]>
This commit is contained in:
+3
-1
@@ -760,7 +760,9 @@ static int tls_prf_generic( mbedtls_md_type_t md_type,
|
||||
exit:
|
||||
mbedtls_md_free( &md_ctx );
|
||||
|
||||
mbedtls_platform_zeroize( tmp, tmp_len );
|
||||
if ( tmp != NULL )
|
||||
mbedtls_platform_zeroize( tmp, tmp_len );
|
||||
|
||||
mbedtls_platform_zeroize( h_i, sizeof( h_i ) );
|
||||
|
||||
mbedtls_free( tmp );
|
||||
|
||||
Reference in New Issue
Block a user