]> 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:50:03 +0000 (15:50 +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)

(cherry picked from commit d38f62ea118170fc40e10f6f95b180cccbaa7581)

crypto/conf/conf_lib.c

index 1766facd658093ea0dd10f40f605cbeef0aedd01..45c50387ac0c327e3af765fd36973af25769f34f 100644 (file)
@@ -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);