summaryrefslogtreecommitdiffstats
path: root/crypto/conf/conf_lib.c
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:50:12 +0200
commitdad7f4d15a521749c934fbb5c5d1fc9e386f9bc2 (patch)
tree82808f953d1147da0b296e4d504c5ef3af436d52 /crypto/conf/conf_lib.c
parentac85b01f6aa608dea8634980a7fd79d840edcf08 (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) (cherry picked from commit d38f62ea118170fc40e10f6f95b180cccbaa7581)
Diffstat (limited to 'crypto/conf/conf_lib.c')
-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 a236003525..2873232287 100644
--- a/crypto/conf/conf_lib.c
+++ b/crypto/conf/conf_lib.c
@@ -464,6 +464,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);