summaryrefslogtreecommitdiff
path: root/ext/mysql/php_mysql.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-04-15 21:56:30 +0400
committerDmitry Stogov <dmitry@zend.com>2014-04-15 21:56:30 +0400
commitf9b26bc39a9ea9b1380628eeb0e6dad3c93cfcb0 (patch)
treeda606ba7a4dd4db0119c0f25af9c201eff56eb21 /ext/mysql/php_mysql.c
parent61e9b0d265364f9b99a1fdc69a9cafd4d3fc4721 (diff)
downloadphp-git-f9b26bc39a9ea9b1380628eeb0e6dad3c93cfcb0.tar.gz
Cleanup (2-nd round)
Diffstat (limited to 'ext/mysql/php_mysql.c')
-rw-r--r--ext/mysql/php_mysql.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index b6d43687e0..1731c8a538 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -1335,8 +1335,9 @@ PHP_FUNCTION(mysql_stat)
RETURN_STRING(stat);
#else
if (mysqlnd_stat(mysql->conn, &stat, &stat_len) == PASS) {
- //???? memleak
- RETURN_STRINGL(stat, stat_len);
+ // TODO: avoid reallocation ???
+ RETVAL_STRINGL(stat, stat_len);
+ efree(stat);
#endif
} else {
RETURN_FALSE;