commit | da73abc8d7bee646b97ce39ac2295c5795d17d7d | [log] [tgz] |
---|---|---|
author | Troy-Butler <squintik@outlook.com> | Tue Apr 02 13:37:31 2024 -0400 |
committer | Troy-Butler <squintik@outlook.com> | Tue Apr 02 13:37:31 2024 -0400 |
tree | b0d6fe24875d08062c06b3658994fbda56b4562d | |
parent | 9ac3e23f5dff2787bb82c504166b60d03f0a94c1 [diff] [blame] |
Fix NULL handling in mbedtls_ssl_config.free() function Signed-off-by: Troy-Butler <squintik@outlook.com>
diff --git a/library/ssl_tls.c b/library/ssl_tls.c index ac53853..32fa8e3 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c
@@ -6029,6 +6029,10 @@ */ 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);