mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-12 22:25:38 +00:00
[session] fix a session copy bug
fix a possible double reference on 'ticket' when peer_cert/peer_cert_digest calloc failed. Signed-off-by: 吴敬辉 <11137405@vivo.com>
This commit is contained in:
parent
dbfc6510b0
commit
0f6c6bc0dc
|
@ -188,6 +188,10 @@ int mbedtls_ssl_session_copy( mbedtls_ssl_session *dst,
|
|||
mbedtls_ssl_session_free( dst );
|
||||
memcpy( dst, src, sizeof( mbedtls_ssl_session ) );
|
||||
|
||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_CLI_C)
|
||||
dst->ticket = NULL;
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_X509_CRT_PARSE_C)
|
||||
|
||||
#if defined(MBEDTLS_SSL_KEEP_PEER_CERTIFICATE)
|
||||
|
|
Loading…
Reference in a new issue