]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Allow calling OPENSSL_INIT_free() with NULL argument
authorTomas Mraz <tomas@openssl.org>
Wed, 19 Jun 2024 15:40:21 +0000 (17:40 +0200)
committerTomas Mraz <tomas@openssl.org>
Mon, 24 Jun 2024 13:49:35 +0000 (15:49 +0200)
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)

crypto/conf/conf_lib.c

index 99e9f8c987b3471b4e6470425846b96dc4be8f49..24cf40449788c9e696ff0074194962d71f2f5593 100644 (file)
@@ -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);