summaryrefslogtreecommitdiff
path: root/ext/pdo
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2014-04-25 11:04:11 +0800
committerXinchen Hui <laruence@gmail.com>2014-04-25 11:04:11 +0800
commit1ccc250c5049521cf3c3c8058fcde2a9dc4403cb (patch)
tree5eff0f7f37e569825d952b5e69bd12643d155f61 /ext/pdo
parent911d58de37152ac58934deafdf26049e9f0c0c72 (diff)
downloadphp-git-1ccc250c5049521cf3c3c8058fcde2a9dc4403cb.tar.gz
Fixed memleak in quote
Diffstat (limited to 'ext/pdo')
-rw-r--r--ext/pdo/pdo_dbh.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c
index f75738cab3..b6cf0265f0 100644
--- a/ext/pdo/pdo_dbh.c
+++ b/ext/pdo/pdo_dbh.c
@@ -1178,8 +1178,9 @@ static PHP_METHOD(PDO, quote)
}
if (dbh->methods->quoter(dbh, str, str_len, &qstr, &qlen, paramtype TSRMLS_CC)) {
- //??? memleak
- RETURN_STRINGL(qstr, qlen);
+ RETVAL_STRINGL(qstr, qlen);
+ efree(qstr);
+ return;
}
PDO_HANDLE_DBH_ERR();
RETURN_FALSE;