summaryrefslogtreecommitdiff
path: root/ext/pdo/pdo_dbh.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pdo/pdo_dbh.c')
-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;