summaryrefslogtreecommitdiff
path: root/ext/pdo_odbc
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-05-05 16:19:51 +0300
committerDmitry Stogov <dmitry@zend.com>2015-05-05 16:19:51 +0300
commit70c86732cb14bad0b2539a54c16e8e845f740117 (patch)
tree102cc8c5265f03b4f0bbd28cd13f29a101893480 /ext/pdo_odbc
parent275afbacd11c2f4d0dac7d450ffdf500d5eab104 (diff)
downloadphp-git-70c86732cb14bad0b2539a54c16e8e845f740117.tar.gz
Use zend_string to represent pdo_column_data.name and avoid duplication.
Diffstat (limited to 'ext/pdo_odbc')
-rw-r--r--ext/pdo_odbc/odbc_stmt.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/pdo_odbc/odbc_stmt.c b/ext/pdo_odbc/odbc_stmt.c
index 5d4ff3af96..6421cb6701 100644
--- a/ext/pdo_odbc/odbc_stmt.c
+++ b/ext/pdo_odbc/odbc_stmt.c
@@ -594,8 +594,7 @@ static int odbc_stmt_describe(pdo_stmt_t *stmt, int colno)
colsize = displaysize;
col->maxlen = S->cols[colno].datalen = colsize;
- col->namelen = colnamelen;
- col->name = estrdup(S->cols[colno].colname);
+ col->name = zend_string_init(S->cols[colno].colname, colnamelen, 0);
S->cols[colno].is_unicode = pdo_odbc_sqltype_is_unicode(S, S->cols[colno].coltype);
/* returning data as a string */