From de71e68000c8624ea13f90b136f8734dd0fb1bdc Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 19 Sep 2016 11:33:14 +0200 Subject: =?UTF-8?q?openssl:=20don=E2=80=99t=20call=20CRYTPO=5Fcleanup=5Fal?= =?UTF-8?q?l=5Fex=5Fdata?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The OpenSSL function CRYTPO_cleanup_all_ex_data() cannot be called multiple times without crashing - and other libs might call it! We basically cannot call it without risking a crash. The function is a no-op since OpenSSL 1.1.0. Not calling this function only risks a small memory leak with OpenSSL < 1.1.0. Bug: https://curl.haxx.se/mail/lib-2016-09/0045.html Reported-by: Todd Short --- lib/vtls/openssl.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'lib/vtls') diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 44a6bd82b..30a8dabc3 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -748,11 +748,6 @@ void Curl_ossl_cleanup(void) ENGINE_cleanup(); #endif -#ifdef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA - /* Free OpenSSL ex_data table */ - CRYPTO_cleanup_all_ex_data(); -#endif - /* Free OpenSSL error strings */ ERR_free_strings(); -- cgit v1.2.3