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.1.7~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbe516a9bd133e405524a9945aef7a7b3a317635;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) (cherry picked from commit d38f62ea118170fc40e10f6f95b180cccbaa7581) --- diff --git a/crypto/conf/conf_lib.c b/crypto/conf/conf_lib.c index 1766facd658..45c50387ac0 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);