From 4f2fb6d4867b9145d1deab0307fedb156793a806 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Kalu=C5=BEa?= Date: Wed, 12 Nov 2014 12:27:09 +0000 Subject: [PATCH] * mod_ssl: call ERR_free_strings() with OpenSSL >= 0.9.8e. Fixes memory leak in mod_ssl on graceful restart. PR 53435. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1638772 13f79535-47bb-0310-9956-ffa450edef68 --- modules/ssl/mod_ssl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/ssl/mod_ssl.c b/modules/ssl/mod_ssl.c index 330d1d0905..cae3f5d870 100644 --- a/modules/ssl/mod_ssl.c +++ b/modules/ssl/mod_ssl.c @@ -313,9 +313,12 @@ static apr_status_t ssl_cleanup_pre_config(void *data) ERR_remove_state(0); #endif - /* Don't call ERR_free_strings here; ERR_load_*_strings only - * actually load the error strings once per process due to static + /* Don't call ERR_free_strings in earlier versions, ERR_load_*_strings only + * actually loaded the error strings once per process due to static * variable abuse in OpenSSL. */ +#if (OPENSSL_VERSION_NUMBER >= 0x00090805f) + ERR_free_strings(); +#endif /* Also don't call CRYPTO_cleanup_all_ex_data here; any registered * ex_data indices may have been cached in static variables in -- 2.40.0