From: Stanislav Malyshev Date: Fri, 17 Jul 2009 00:57:46 +0000 (+0000) Subject: fix memory leak X-Git-Tag: php-5.4.0alpha1~191^2~3089 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fa1f24867a5fdc0835de6dafb952289fc07477ce;p=php fix memory leak --- diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index 23e3a889e9..86e77a735a 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -316,8 +316,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;