Skip to content

Commit a63d0f5

Browse files
committed
Fix memory leak with not freeing OpenSSL errors
1 parent 47e7662 commit a63d0f5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/openssl/openssl.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,6 +1277,10 @@ PHP_MSHUTDOWN_FUNCTION(openssl)
12771277
{
12781278
EVP_cleanup();
12791279

1280+
#if OPENSSL_VERSION_NUMBER >= 0x00090805f
1281+
ERR_free_strings();
1282+
#endif
1283+
12801284
php_unregister_url_stream_wrapper("https" TSRMLS_CC);
12811285
php_unregister_url_stream_wrapper("ftps" TSRMLS_CC);
12821286

0 commit comments

Comments
 (0)