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

index e1fd8d5817e373e582a99a187b02e30bbb56cd24..47eba946888702d6c6e60e195543c33cd41ab1dc 100644 (file)
@@ -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;