mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1: Fix GH-8979: Possible Memory Leak with SSL-enabled MySQL connections
This commit is contained in:
commit
337973fccc
4
NEWS
4
NEWS
@ -35,6 +35,10 @@ PHP NEWS
|
||||
. Fixed bug GH-10521 (ftp_get/ftp_nb_get resumepos offset is maximum 10GB).
|
||||
(nielsdos)
|
||||
|
||||
- MySQLnd:
|
||||
. Fixed bug GH-8979 (Possible Memory Leak with SSL-enabled MySQL
|
||||
connections). (nielsdos)
|
||||
|
||||
- Opcache:
|
||||
. Fixed build for macOS to cater with pkg-config settings. (David Carlier)
|
||||
. Fixed bug GH-8065 (opcache.consistency_checks > 0 causes segfaults in
|
||||
|
@ -561,6 +561,10 @@ MYSQLND_METHOD(mysqlnd_vio, enable_ssl)(MYSQLND_VIO * const net)
|
||||
}
|
||||
}
|
||||
php_stream_context_set(net_stream, context);
|
||||
/* php_stream_context_set() increases the refcount of context, but we just want to transfer ownership
|
||||
* hence the need to decrease the refcount so the refcount will be equal to 1. */
|
||||
ZEND_ASSERT(GC_REFCOUNT(context->res) == 2);
|
||||
GC_DELREF(context->res);
|
||||
if (php_stream_xport_crypto_setup(net_stream, STREAM_CRYPTO_METHOD_TLS_CLIENT, NULL) < 0 ||
|
||||
php_stream_xport_crypto_enable(net_stream, 1) < 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user