Change cookie free code and some comments

Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
This commit is contained in:
XiaokangQian 2022-01-27 02:25:04 +00:00
parent 52da558103
commit 34909746df
3 changed files with 8 additions and 5 deletions

View file

@ -559,6 +559,7 @@ static int ssl_tls13_parse_cookie_ext( mbedtls_ssl_context *ssl,
MBEDTLS_SSL_DEBUG_BUF( 3, "cookie extension", p, cookie_len );
mbedtls_free( handshake->verify_cookie );
handshake->verify_cookie_len = 0;
handshake->verify_cookie = mbedtls_calloc( 1, cookie_len );
if( handshake->verify_cookie == NULL )
{