summaryrefslogtreecommitdiff
path: root/ext/pdo_mysql/mysql_driver.c
diff options
context:
space:
mode:
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);