mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
There should been memory leaks(and don't use pointer cast)
This commit is contained in:
parent
5f46c8fa31
commit
c242518bf0
3 changed files with 11 additions and 7 deletions
|
@ -262,7 +262,7 @@ static void php_ini_parser_cb(zval *arg1, zval *arg2, zval *arg3, int callback_t
|
|||
/* If option not found in hash or is not an array -> create array, otherwise add to existing array */
|
||||
if ((find_arr = zend_hash_find(active_hash, Z_STR_P(arg1))) == NULL || Z_TYPE_P(find_arr) != IS_ARRAY) {
|
||||
ZVAL_NEW_PERSISTENT_ARR(&option_arr);
|
||||
zend_hash_init(Z_ARRVAL(option_arr), 8, NULL, (dtor_func_t) config_zval_dtor, 1);
|
||||
zend_hash_init(Z_ARRVAL(option_arr), 8, NULL, config_zval_dtor, 1);
|
||||
find_arr = zend_hash_update(active_hash, Z_STR_P(arg1), &option_arr);
|
||||
}
|
||||
|
||||
|
@ -386,7 +386,7 @@ int php_init_config(TSRMLS_D)
|
|||
int free_ini_search_path = 0;
|
||||
zend_file_handle fh;
|
||||
|
||||
zend_hash_init(&configuration_hash, 8, NULL, (dtor_func_t) config_zval_dtor, 1);
|
||||
zend_hash_init(&configuration_hash, 8, NULL, config_zval_dtor, 1);
|
||||
|
||||
if (sapi_module.ini_defaults) {
|
||||
sapi_module.ini_defaults(&configuration_hash);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue