diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-02-17 17:59:18 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-02-17 17:59:18 +0400 |
commit | 2b9b9afa7a9a66f9c80013ce4121183bdff434e8 (patch) | |
tree | 6fa09b93653af14de10c02215632e5cc458cf60a /main/php_ini.c | |
parent | 50661690709630bd5dcea599bb0f276083292921 (diff) | |
download | php-git-2b9b9afa7a9a66f9c80013ce4121183bdff434e8.tar.gz |
Use better data structures (incomplete)
Diffstat (limited to 'main/php_ini.c')
-rw-r--r-- | main/php_ini.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/main/php_ini.c b/main/php_ini.c index 118743fba3..cb68d83e65 100644 --- a/main/php_ini.c +++ b/main/php_ini.c @@ -193,9 +193,9 @@ PHPAPI void config_zval_dtor(zval *zvalue) { if (Z_TYPE_P(zvalue) == IS_ARRAY) { zend_hash_destroy(Z_ARRVAL_P(zvalue)); - free(Z_ARRVAL_P(zvalue)); + free(Z_ARR_P(zvalue)); } else if (Z_TYPE_P(zvalue) == IS_STRING) { - free(Z_STRVAL_P(zvalue)); + STR_RELEASE(Z_STR_P(zvalue)); } } /* Reset / free active_ini_sectin global */ @@ -591,8 +591,6 @@ int php_init_config(TSRMLS_D) zval tmp; ZVAL_STR(&tmp, STR_INIT(fh.filename, strlen(fh.filename), 1)); - Z_SET_REFCOUNT(tmp, 0); - zend_hash_str_update(&configuration_hash, "cfg_file_path", sizeof("cfg_file_path")-1, &tmp); if (php_ini_opened_path) { efree(php_ini_opened_path); |