summaryrefslogtreecommitdiff
path: root/ext/pdo/pdo_sql_parser.re
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2006-11-12 17:49:19 +0000
committerIlia Alshanetsky <iliaa@php.net>2006-11-12 17:49:19 +0000
commitc32ed59e4e8cf9424e3494994a8d8b532c7b9d39 (patch)
tree2b3fb8ecb7bc52625679364019949e2f2f580e73 /ext/pdo/pdo_sql_parser.re
parent3bf35bbc15ec0183aaba9c43ce5278a822ddc533 (diff)
downloadphp-git-c32ed59e4e8cf9424e3494994a8d8b532c7b9d39.tar.gz
Fixed a memory leak when named & positional params are being used in the
same query.
Diffstat (limited to 'ext/pdo/pdo_sql_parser.re')
-rw-r--r--ext/pdo/pdo_sql_parser.re3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/pdo/pdo_sql_parser.re b/ext/pdo/pdo_sql_parser.re
index a976c1fa6e..55a84b8fad 100644
--- a/ext/pdo/pdo_sql_parser.re
+++ b/ext/pdo/pdo_sql_parser.re
@@ -128,7 +128,8 @@ PDO_API int pdo_parse_params(pdo_stmt_t *stmt, char *inquery, int inquery_len,
if (query_type == (PDO_PLACEHOLDER_NAMED|PDO_PLACEHOLDER_POSITIONAL)) {
/* they mixed both types; punt */
pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "mixed named and positional parameters" TSRMLS_CC);
- return -1;
+ ret = -1;
+ goto clean_up;
}