diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2006-03-15 15:25:50 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2006-03-15 15:25:50 +0000 |
commit | 92ba7cccad8c1ab0e1105ed70a1523ab8b669424 (patch) | |
tree | 9f9a9f623ccdee665abbbdc2aaefd7914a205530 | |
parent | 79983ce0ced51844381898366a81d39abfe24070 (diff) | |
download | php-git-92ba7cccad8c1ab0e1105ed70a1523ab8b669424.tar.gz |
Fixed memory leak on unused bind var.
-rwxr-xr-x | ext/pdo/pdo_stmt.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 591c46e64a..1ea63b9481 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -326,8 +326,11 @@ static int really_register_bound_param(struct pdo_bound_param_data *param, pdo_s /* tell the driver we just created a parameter */ if (stmt->methods->param_hook) { - if (!stmt->methods->param_hook(stmt, param, - PDO_PARAM_EVT_ALLOC TSRMLS_CC)) { + if (!stmt->methods->param_hook(stmt, param, PDO_PARAM_EVT_ALLOC TSRMLS_CC)) { + if (param->name) { + efree(param->name); + param->name = NULL; + } return 0; } } |