diff options
author | Wez Furlong <wez@php.net> | 2005-02-06 23:58:53 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2005-02-06 23:58:53 +0000 |
commit | 61981912f8f2000f5c05bb566a9be378db7982f2 (patch) | |
tree | 72f21f995251b3bffe3c458578484ac977c116c3 /ext/pdo_firebird/firebird_statement.c | |
parent | 17537ac5009511ad174cd2380f5777f99364355d (diff) | |
download | php-git-61981912f8f2000f5c05bb566a9be378db7982f2.tar.gz |
hmmm
Diffstat (limited to 'ext/pdo_firebird/firebird_statement.c')
-rw-r--r-- | ext/pdo_firebird/firebird_statement.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/pdo_firebird/firebird_statement.c b/ext/pdo_firebird/firebird_statement.c index 7242ccfb68..144dc94580 100644 --- a/ext/pdo_firebird/firebird_statement.c +++ b/ext/pdo_firebird/firebird_statement.c @@ -520,6 +520,7 @@ static int firebird_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_dat switch (event_type) { char *value; unsigned long value_len; + int caller_frees; case PDO_PARAM_EVT_ALLOC: if (param->is_param) { @@ -601,8 +602,9 @@ static int firebird_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_dat case PDO_PARAM_EVT_FETCH_POST: value = NULL; value_len = 0; + caller_frees = 0; - if (firebird_stmt_get_col(stmt, param->paramno, &value, &value_len TSRMLS_CC)) { + if (firebird_stmt_get_col(stmt, param->paramno, &value, &value_len, &caller_frees TSRMLS_CC)) { switch (param->param_type) { case PDO_PARAM_STR: if (value) { @@ -624,6 +626,9 @@ static int firebird_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_dat default: ZVAL_NULL(param->parameter); } + if (value && caller_frees) { + efree(value); + } return 1; } return 0; |