]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* mod_ssl: call ERR_free_strings() with OpenSSL >= 0.9.8e. Fixes memory leak
authorJan Kaluža <jkaluza@apache.org>
Wed, 12 Nov 2014 12:27:09 +0000 (12:27 +0000)
committerJan Kaluža <jkaluza@apache.org>
Wed, 12 Nov 2014 12:27:09 +0000 (12:27 +0000)
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

index 330d1d0905bbff247871026717cef0e4418ab8e6..cae3f5d870ff45bc8d43ad6ffdffc08ca270b915 100644 (file)
@@ -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