Skip to content

Commit 74ed42c

Browse files
committed
Fix a memleak with mysqlnd and SSL
1 parent e3cf72b commit 74ed42c

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

NEWS

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ PHP NEWS
1919
- libxml2:
2020
. Fixed bug #75871 (use pkg-config where available). (pmmaga)
2121

22+
- mysqlnd
23+
. Fixed negotiation of MySQL authenticaton plugin. (Johannes)
24+
. Fixed a memleak with SSL connections. (Johannes)
25+
2226
- ODBC:
2327
. Fixed bug #73725 (Unable to retrieve value of varchar(max) type). (Anatol)
2428

ext/mysqlnd/mysqlnd_auth.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ mysqlnd_sha256_auth_get_auth_data(struct st_mysqlnd_authentication_plugin * self
787787
DBG_INF_FMT("salt(%d)=[%.*s]", auth_plugin_data_len, auth_plugin_data_len, auth_plugin_data);
788788

789789

790-
if (conn->protocol_frame_codec->data->ssl) {
790+
if (conn->vio->data->ssl) {
791791
DBG_INF("simple clear text under SSL");
792792
/* clear text under SSL */
793793
*auth_data_len = passwd_len;

ext/mysqlnd/mysqlnd_vio.c

+1
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ MYSQLND_METHOD(mysqlnd_vio, enable_ssl)(MYSQLND_VIO * const net)
517517
zval cafile_zval;
518518
ZVAL_STRING(&cafile_zval, net->data->options.ssl_ca);
519519
php_stream_context_set_option(context, "ssl", "cafile", &cafile_zval);
520+
zval_ptr_dtor(&cafile_zval);
520521
any_flag = TRUE;
521522
}
522523
if (net->data->options.ssl_capath) {

0 commit comments

Comments
 (0)