mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 00:06:32 +01:00
Merge branch 'iotssl-517-double-free-restricted' into development-restricted
* iotssl-517-double-free-restricted: Fix potential double-free in ssl_conf_psk()
This commit is contained in:
commit
f8b2442e2f
2 changed files with 5 additions and 0 deletions
|
|
@ -5772,6 +5772,8 @@ int mbedtls_ssl_conf_psk( mbedtls_ssl_config *conf,
|
|||
{
|
||||
mbedtls_free( conf->psk );
|
||||
mbedtls_free( conf->psk_identity );
|
||||
conf->psk = NULL;
|
||||
conf->psk_identity = NULL;
|
||||
}
|
||||
|
||||
if( ( conf->psk = mbedtls_calloc( 1, psk_len ) ) == NULL ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue