From: Felipe Pena Date: Mon, 9 Feb 2009 12:07:10 +0000 (+0000) Subject: - Fix mem. leak X-Git-Tag: php-5.4.0alpha1~191^2~4311 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d4baef3d92e7b9f13d650b2a50c384c69fd29944;p=php - Fix mem. leak --- diff --git a/ext/pdo_firebird/firebird_statement.c b/ext/pdo_firebird/firebird_statement.c index 2ceb93b587..f2d9780e74 100644 --- a/ext/pdo_firebird/firebird_statement.c +++ b/ext/pdo_firebird/firebird_statement.c @@ -466,6 +466,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)]; }