]> granicus.if.org Git - php/commitdiff
fix memleak
authorStanislav Malyshev <stas@php.net>
Fri, 17 Jul 2009 00:48:59 +0000 (00:48 +0000)
committerStanislav Malyshev <stas@php.net>
Fri, 17 Jul 2009 00:48:59 +0000 (00:48 +0000)
Zend/zend_ini.c

index 2b32ac688aa5ebc6bfd8258486a4d60f3c2eba85..032bf0d83d4070781d43f40d220dcbf43e467220 100644 (file)
@@ -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;