switch (event_type) {
char *value;
unsigned long value_len;
+ int caller_frees;
case PDO_PARAM_EVT_ALLOC:
if (param->is_param) {
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) {
default:
ZVAL_NULL(param->parameter);
}
+ if (value && caller_frees) {
+ efree(value);
+ }
return 1;
}
return 0;