summaryrefslogtreecommitdiff
path: root/ext/pdo_mysql/mysql_driver.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2014-06-19 23:00:45 +0800
committerXinchen Hui <laruence@php.net>2014-06-19 23:00:45 +0800
commit73630a1fdc3f740110792682618b6a33ae8bc46e (patch)
tree15f216cfed4c1a20765649d3486833610905a0af /ext/pdo_mysql/mysql_driver.c
parent33aa5eb6b636b162a4c8aec374a04c03e217ec8c (diff)
downloadphp-git-73630a1fdc3f740110792682618b6a33ae8bc46e.tar.gz
Fixed pdo_mysql build with mysqlnd
Diffstat (limited to 'ext/pdo_mysql/mysql_driver.c')
-rw-r--r--ext/pdo_mysql/mysql_driver.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c
index fcc395d65a..d7c993509f 100644
--- a/ext/pdo_mysql/mysql_driver.c
+++ b/ext/pdo_mysql/mysql_driver.c
@@ -444,7 +444,8 @@ static int pdo_mysql_get_attribute(pdo_dbh_t *dbh, long attr, zval *return_value
unsigned int tmp_len;
if (mysqlnd_stat(H->server, &tmp, &tmp_len) == PASS) {
- ZVAL_STRINGL(return_value, tmp, tmp_len, 0);
+ ZVAL_STRINGL(return_value, tmp, tmp_len);
+ efree(tmp);
#else
if ((tmp = (char *)mysql_stat(H->server))) {
ZVAL_STRING(return_value, tmp);