From d38f62ea118170fc40e10f6f95b180cccbaa7581 Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Wed, 19 Jun 2024 17:40:21 +0200 Subject: 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) --- crypto/conf/conf_lib.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crypto/conf/conf_lib.c b/crypto/conf/conf_lib.c index 99e9f8c987..24cf404497 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); -- cgit v1.2.3