1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-08 17:42:09 +03:00

Merge pull request #9045 from Troy-Butler/handle-null-args

[Backport 3.6] Fix NULL argument handling in mbedtls_xxx_free() functions
This commit is contained in:
Gilles Peskine
2024-07-04 14:50:59 +00:00
committed by GitHub
12 changed files with 53 additions and 1 deletions

View File

@@ -6040,6 +6040,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);