diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-09-14 23:04:27 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-09-14 23:04:27 +0300 |
commit | 927d68db246c8679bcfcf363eb61ae7b7a9f0dc8 (patch) | |
tree | 8e3bd4867a590de3f402161278e72f79cc2524db /ext/pgsql/pgsql.c | |
parent | 5c28c21159ca2c41026c5381d9dbf119b8fd6882 (diff) | |
download | php-git-927d68db246c8679bcfcf363eb61ae7b7a9f0dc8.tar.gz |
Avoid reallocations
Diffstat (limited to 'ext/pgsql/pgsql.c')
-rw-r--r-- | ext/pgsql/pgsql.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 89615080d8..e8e5a536f7 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -2781,9 +2781,7 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_ ZVAL_COPY_VALUE(&dataset, return_value); object_and_properties_init(return_value, ce, NULL); if (!ce->default_properties_count && !ce->__set) { - ALLOC_HASHTABLE(Z_OBJ_P(return_value)->properties); - *Z_OBJ_P(return_value)->properties = *Z_ARRVAL(dataset); - efree(Z_ARR(dataset)); + Z_OBJ_P(return_value)->properties = Z_ARR(dataset); } else { zend_merge_properties(return_value, Z_ARRVAL(dataset)); zval_ptr_dtor(&dataset); |