]> 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:12 +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 a2360035257a97076335df5e77acc6f8660aefa6..2873232287d2e94de067b575b1e5e2de52b7a487 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);