summaryrefslogtreecommitdiff
path: root/ext/pdo_mysql/mysql_driver.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2016-02-15 10:29:28 +0800
committerXinchen Hui <laruence@gmail.com>2016-02-15 10:29:28 +0800
commit5e152f54ae2d431d983476edd822eb522f39743f (patch)
tree2efddaa4a34215ffaec576cd086f49f980d644f2 /ext/pdo_mysql/mysql_driver.c
parent35f6f9b0dbc683812badf3a8e38d1ec110fd7925 (diff)
parentaa10fc6092ab190751abafcf4b51713344aa583a (diff)
downloadphp-git-5e152f54ae2d431d983476edd822eb522f39743f.tar.gz
Merge branch 'PHP-5.6' of git.php.net:/php-src into PHP-5.6
* 'PHP-5.6' of git.php.net:/php-src: update NEWS Fixed bug #71559 Built-in HTTP server, we can downlaod file in web by bug Check length of string before comparing to :memory: Fix bounds check in strip_tags() Fix test description FIx bug #71569
Diffstat (limited to 'ext/pdo_mysql/mysql_driver.c')
-rw-r--r--ext/pdo_mysql/mysql_driver.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c
index 003a0c33be..e82fdf46db 100644
--- a/ext/pdo_mysql/mysql_driver.c
+++ b/ext/pdo_mysql/mysql_driver.c
@@ -658,31 +658,31 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
init_cmd = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_INIT_COMMAND, NULL TSRMLS_CC);
if (init_cmd) {
if (mysql_options(H->server, MYSQL_INIT_COMMAND, (const char *)init_cmd)) {
- efree(init_cmd);
+ str_efree(init_cmd);
pdo_mysql_error(dbh);
goto cleanup;
}
- efree(init_cmd);
+ str_efree(init_cmd);
}
#ifndef PDO_USE_MYSQLND
default_file = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_READ_DEFAULT_FILE, NULL TSRMLS_CC);
if (default_file) {
if (mysql_options(H->server, MYSQL_READ_DEFAULT_FILE, (const char *)default_file)) {
- efree(default_file);
+ str_efree(default_file);
pdo_mysql_error(dbh);
goto cleanup;
}
- efree(default_file);
+ str_efree(default_file);
}
default_group= pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_READ_DEFAULT_GROUP, NULL TSRMLS_CC);
if (default_group) {
if (mysql_options(H->server, MYSQL_READ_DEFAULT_GROUP, (const char *)default_group)) {
- efree(default_group);
+ str_efree(default_group);
pdo_mysql_error(dbh);
goto cleanup;
}
- efree(default_group);
+ str_efree(default_group);
}
#endif
compress = pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_COMPRESS, 0 TSRMLS_CC);
@@ -702,19 +702,19 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
if (ssl_key || ssl_cert || ssl_ca || ssl_capath || ssl_cipher) {
mysql_ssl_set(H->server, ssl_key, ssl_cert, ssl_ca, ssl_capath, ssl_cipher);
if (ssl_key) {
- efree(ssl_key);
+ str_efree(ssl_key);
}
if (ssl_cert) {
- efree(ssl_cert);
+ str_efree(ssl_cert);
}
if (ssl_ca) {
- efree(ssl_ca);
+ str_efree(ssl_ca);
}
if (ssl_capath) {
- efree(ssl_capath);
+ str_efree(ssl_capath);
}
if (ssl_cipher) {
- efree(ssl_cipher);
+ str_efree(ssl_cipher);
}
}
@@ -724,10 +724,10 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
if (public_key) {
if (mysql_options(H->server, MYSQL_SERVER_PUBLIC_KEY, public_key)) {
pdo_mysql_error(dbh);
- efree(public_key);
+ str_efree(public_key);
goto cleanup;
}
- efree(public_key);
+ str_efree(public_key);
}
}
#endif