Fix NULL handling in mbedtls_ssl_config.free() function

Signed-off-by: Troy-Butler <squintik@outlook.com>
This commit is contained in:
Troy-Butler 2024-04-02 13:37:31 -04:00
parent 9ac3e23f5d
commit da73abc8d7

View File

@ -6029,6 +6029,10 @@ int mbedtls_ssl_config_defaults(mbedtls_ssl_config *conf,
*/
void mbedtls_ssl_config_free(mbedtls_ssl_config *conf)
{
if (conf == NULL) {
return;
}
#if defined(MBEDTLS_DHM_C)
mbedtls_mpi_free(&conf->dhm_P);
mbedtls_mpi_free(&conf->dhm_G);