summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2024-06-19 17:40:21 +0200
committerTomas Mraz <tomas@openssl.org>2024-06-24 15:49:35 +0200
commitd38f62ea118170fc40e10f6f95b180cccbaa7581 (patch)
tree7861b6bf0033ff8a8fd5437e84f015e1bdce49a0
parent3fc784835cdb8489117c2680e867cd32b3b70fbe (diff)
Allow calling OPENSSL_INIT_free() with NULL argument
Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> (Merged from https://github.com/openssl/openssl/pull/24681)
-rw-r--r--crypto/conf/conf_lib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/conf/conf_lib.c b/crypto/conf/conf_lib.c
index 99e9f8c987..24cf404497 100644
--- a/crypto/conf/conf_lib.c
+++ b/crypto/conf/conf_lib.c
@@ -476,6 +476,9 @@ int OPENSSL_INIT_set_config_appname(OPENSSL_INIT_SETTINGS *settings,
void OPENSSL_INIT_free(OPENSSL_INIT_SETTINGS *settings)
{
+ if (settings == NULL)
+ return;
+
free(settings->filename);
free(settings->appname);
free(settings);