From: Tomas Mraz Date: Wed, 19 Jun 2024 15:40:21 +0000 (+0200) Subject: Allow calling OPENSSL_INIT_free() with NULL argument X-Git-Tag: openssl-3.4.0-alpha1~453 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d38f62ea118170fc40e10f6f95b180cccbaa7581;p=thirdparty%2Fopenssl.git Allow calling OPENSSL_INIT_free() with NULL argument Reviewed-by: Neil Horman Reviewed-by: Matt Caswell Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/24681) --- diff --git a/crypto/conf/conf_lib.c b/crypto/conf/conf_lib.c index 99e9f8c987b..24cf4044978 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);