summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2009-02-09 12:07:35 +0000
committerFelipe Pena <felipe@php.net>2009-02-09 12:07:35 +0000
commit99afacffcd5ed9492fc2754d54739d45e8904fa8 (patch)
treea35e3ee5521e1675e7b772425e247b85f3666b06
parent09f6582694a5cc4bd8e7ecf41222e948d7125a74 (diff)
downloadphp-git-99afacffcd5ed9492fc2754d54739d45e8904fa8.tar.gz
- MFH: Fix mem. leak
-rw-r--r--ext/pdo_firebird/firebird_statement.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/pdo_firebird/firebird_statement.c b/ext/pdo_firebird/firebird_statement.c
index 68ebc5916a..76972731e3 100644
--- a/ext/pdo_firebird/firebird_statement.c
+++ b/ext/pdo_firebird/firebird_statement.c
@@ -527,6 +527,9 @@ static int firebird_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_dat
case PDO_PARAM_EVT_ALLOC:
if (param->is_param) {
/* allocate the parameter */
+ if (var->sqlind) {
+ efree(var->sqlind);
+ }
var->sqlind = (void*)emalloc(var->sqllen + 2*sizeof(short));
var->sqldata = &((char*)var->sqlind)[sizeof(short)];
}