diff options
author | Stanislav Malyshev <stas@php.net> | 2009-07-17 00:48:59 +0000 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2009-07-17 00:48:59 +0000 |
commit | 326cb1bb0f4662818cc398177151218dbc758a1c (patch) | |
tree | df38a61f2533e18be97202f76070e63b78a4dc00 /Zend/zend_ini.c | |
parent | f4f825a7a52905b90b8275fbe4568c85623bd162 (diff) | |
download | php-git-326cb1bb0f4662818cc398177151218dbc758a1c.tar.gz |
fix memleak
Diffstat (limited to 'Zend/zend_ini.c')
-rw-r--r-- | Zend/zend_ini.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index 2b32ac688a..032bf0d83d 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -315,8 +315,11 @@ ZEND_API int zend_restore_ini_entry(char *name, uint name_length, int stage) /* } if (EG(modified_ini_directives)) { - zend_restore_ini_entry_cb(ini_entry, stage TSRMLS_CC); - zend_hash_del(EG(modified_ini_directives), name, name_length); + if(zend_restore_ini_entry_cb(ini_entry, stage TSRMLS_CC) == 0) { + zend_hash_del(EG(modified_ini_directives), name, name_length); + } else { + return FAILURE; + } } return SUCCESS; |