From 05033c9ebd015baf825581e5725a594da277d560 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Wed, 8 Jun 2016 18:21:39 +0100 Subject: [PATCH] Fix bug #72140 (segfault after calling ERR_free_strings()) --- NEWS | 4 ++++ ext/openssl/openssl.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/NEWS b/NEWS index 8686b862f8..221d5eb369 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,10 @@ PHP NEWS . Fixed bug #70484 (selectordinal doesn't work with named parameters). (Anatol) +- OpenSSL: + . Fixed bug #72140 (segfault after calling ERR_free_strings()). + (Jakub Zelenka) + 26 May 2016, PHP 5.6.22 - Core: diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 88e396c630..79f666acc5 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -1278,6 +1278,9 @@ PHP_MSHUTDOWN_FUNCTION(openssl) EVP_cleanup(); #if OPENSSL_VERSION_NUMBER >= 0x00090805f + /* prevent accessing locking callback from unloaded extension */ + CRYPTO_set_locking_callback(NULL); + /* free allocated error strings */ ERR_free_strings(); #endif -- 2.50.1