From: Jan Kaluža Date: Wed, 12 Nov 2014 12:27:09 +0000 (+0000) Subject: * mod_ssl: call ERR_free_strings() with OpenSSL >= 0.9.8e. Fixes memory leak X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94651c0e9bbd8add11dda3148bccf5ac479e52a0;p=thirdparty%2Fapache%2Fhttpd.git * 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 --- diff --git a/modules/ssl/mod_ssl.c b/modules/ssl/mod_ssl.c index 330d1d0905b..cae3f5d870f 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