summaryrefslogtreecommitdiff
path: root/ext/pdo_odbc/odbc_driver.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-04-15 15:40:40 +0400
committerDmitry Stogov <dmitry@zend.com>2014-04-15 15:40:40 +0400
commit050d7e38ad4163e7fa65e26724d3516ce7b33601 (patch)
tree2bb49b1b73c37b35fc778e83d9353f0eb9cc12a3 /ext/pdo_odbc/odbc_driver.c
parent93d3a613d82d32dd6f5499e211bfe194d60898b0 (diff)
downloadphp-git-050d7e38ad4163e7fa65e26724d3516ce7b33601.tar.gz
Cleanup (1-st round)
Diffstat (limited to 'ext/pdo_odbc/odbc_driver.c')
-rw-r--r--ext/pdo_odbc/odbc_driver.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/pdo_odbc/odbc_driver.c b/ext/pdo_odbc/odbc_driver.c
index 339db5698a..d4bf234689 100644
--- a/ext/pdo_odbc/odbc_driver.c
+++ b/ext/pdo_odbc/odbc_driver.c
@@ -49,8 +49,10 @@ static int pdo_odbc_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *inf
einfo->file, einfo->line);
add_next_index_long(info, einfo->last_error);
- add_next_index_string(info, message, 0);
- add_next_index_string(info, einfo->last_state, 1);
+ // TODO: avoid reallocation ???
+ add_next_index_string(info, message);
+ efree(message);
+ add_next_index_string(info, einfo->last_state);
return 1;
}