aboutsummaryrefslogtreecommitdiff
path: root/crypto/conf
diff options
context:
space:
mode:
authorTomas Mraz <tmraz@fedoraproject.org>2018-08-14 17:43:36 -0400
committerRich Salz <rsalz@openssl.org>2018-08-14 17:43:36 -0400
commit60c526975aecba7e7aa229a92624498b36abf971 (patch)
tree094575a698dd9087613fad2b547ce8367394197c /crypto/conf
parentb1bebbcb67325593f8af247582208940a4cc0332 (diff)
downloadopenssl-60c526975aecba7e7aa229a92624498b36abf971.zip
openssl-60c526975aecba7e7aa229a92624498b36abf971.tar.gz
openssl-60c526975aecba7e7aa229a92624498b36abf971.tar.bz2
Deallocate previously loaded SSL CONF module data
If application explicitly calls CONF_modules_load_file() the SSL conf module will be initialized twice and the module data would leak. We need to free it before initializing it again. Fixes #6835 Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6948)
Diffstat (limited to 'crypto/conf')
-rw-r--r--crypto/conf/conf_ssl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/conf/conf_ssl.c b/crypto/conf/conf_ssl.c
index 015c46c..024bdb4 100644
--- a/crypto/conf/conf_ssl.c
+++ b/crypto/conf/conf_ssl.c
@@ -76,6 +76,7 @@ static int ssl_module_init(CONF_IMODULE *md, const CONF *cnf)
goto err;
}
cnt = sk_CONF_VALUE_num(cmd_lists);
+ ssl_module_free(md);
ssl_names = OPENSSL_zalloc(sizeof(*ssl_names) * cnt);
ssl_names_count = cnt;
for (i = 0; i < ssl_names_count; i++) {