From: Dmitry Stogov Date: Tue, 2 Sep 2014 05:46:27 +0000 (+0400) Subject: Fixed destruction on error X-Git-Tag: PRE_PHP7_REMOVALS~156 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f789568707e23a334c5edc944511976f269b1f74;p=php Fixed destruction on error --- diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index 3708efad6c..897255df08 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -215,8 +215,11 @@ ZEND_API int zend_register_ini_entries(const zend_ini_entry_def *ini_entry, int config_directive_success = 0; if (zend_hash_add_ptr(directives, p->name, (void*)p) == NULL) { - if (p->orig_value) { - zend_string_release(p->orig_value); + if (p->name) { + zend_string_release(p->name); + } + if (p->value) { + zend_string_release(p->value); } zend_unregister_ini_entries(module_number TSRMLS_CC); return FAILURE;