summaryrefslogtreecommitdiff
path: root/ext/pdo_mysql/mysql_driver.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-05-28 16:27:12 +0300
committerDmitry Stogov <dmitry@zend.com>2018-05-28 16:27:12 +0300
commit5eb1f92f31cafc48384f9096012f421b37f6d425 (patch)
tree4ed67b92229407e7b5cbab37b96428fe80eb3f94 /ext/pdo_mysql/mysql_driver.c
parent925f05dd1a35eafa71eb29abb69cdfc31a23a75d (diff)
downloadphp-git-5eb1f92f31cafc48384f9096012f421b37f6d425.tar.gz
Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence.
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 d9c05302ad..3cfd32f6ad 100644
--- a/ext/pdo_mysql/mysql_driver.c
+++ b/ext/pdo_mysql/mysql_driver.c
@@ -662,31 +662,31 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options)
init_cmd = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_INIT_COMMAND, NULL);
if (init_cmd) {
if (mysql_options(H->server, MYSQL_INIT_COMMAND, (const char *)ZSTR_VAL(init_cmd))) {
- zend_string_release(init_cmd);
+ zend_string_release_ex(init_cmd, 0);
pdo_mysql_error(dbh);
goto cleanup;
}
- zend_string_release(init_cmd);
+ zend_string_release_ex(init_cmd, 0);
}
#ifndef PDO_USE_MYSQLND
default_file = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_READ_DEFAULT_FILE, NULL);
if (default_file) {
if (mysql_options(H->server, MYSQL_READ_DEFAULT_FILE, (const char *)ZSTR_VAL(default_file))) {
- zend_string_release(default_file);
+ zend_string_release_ex(default_file, 0);
pdo_mysql_error(dbh);
goto cleanup;
}
- zend_string_release(default_file);
+ zend_string_release_ex(default_file, 0);
}
default_group = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_READ_DEFAULT_GROUP, NULL);
if (default_group) {
if (mysql_options(H->server, MYSQL_READ_DEFAULT_GROUP, (const char *)ZSTR_VAL(default_group))) {
- zend_string_release(default_group);
+ zend_string_release_ex(default_group, 0);
pdo_mysql_error(dbh);
goto cleanup;
}
- zend_string_release(default_group);
+ zend_string_release_ex(default_group, 0);
}
#endif
compress = pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_COMPRESS, 0);
@@ -711,19 +711,19 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options)
ssl_capath? ZSTR_VAL(ssl_capath) : NULL,
ssl_cipher? ZSTR_VAL(ssl_cipher) : NULL);
if (ssl_key) {
- zend_string_release(ssl_key);
+ zend_string_release_ex(ssl_key, 0);
}
if (ssl_cert) {
- zend_string_release(ssl_cert);
+ zend_string_release_ex(ssl_cert, 0);
}
if (ssl_ca) {
- zend_string_release(ssl_ca);
+ zend_string_release_ex(ssl_ca, 0);
}
if (ssl_capath) {
- zend_string_release(ssl_capath);
+ zend_string_release_ex(ssl_capath, 0);
}
if (ssl_cipher) {
- zend_string_release(ssl_cipher);
+ zend_string_release_ex(ssl_cipher, 0);
}
}
@@ -733,10 +733,10 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options)
if (public_key) {
if (mysql_options(H->server, MYSQL_SERVER_PUBLIC_KEY, ZSTR_VAL(public_key))) {
pdo_mysql_error(dbh);
- zend_string_release(public_key);
+ zend_string_release_ex(public_key, 0);
goto cleanup;
}
- zend_string_release(public_key);
+ zend_string_release_ex(public_key, 0);
}
}
#endif