From 326cb1bb0f4662818cc398177151218dbc758a1c Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Fri, 17 Jul 2009 00:48:59 +0000 Subject: [PATCH] fix memleak --- Zend/zend_ini.c | 7 +++++-- 1 file 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; -- 2.40.0