From: Anatol Belski Date: Mon, 21 Dec 2015 11:09:24 +0000 (+0100) Subject: Revert "Partially fix bug #71129" X-Git-Tag: php-7.0.2RC1~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=53bfb6618d13083b769014cbdcb845f787a7cf28;p=php Revert "Partially fix bug #71129" This reverts commit 4c55669caa96f6202c2047a7baf6c5d5894d5fa7. The way it is fixes doesn't satisfy every SAPI, so a better solution is yet to work out. --- diff --git a/Zend/zend.c b/Zend/zend.c index 3a52200671..d211f14d0f 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -448,11 +448,7 @@ static void zend_init_call_trampoline_op(void) /* {{{ */ static void auto_global_dtor(zval *zv) /* {{{ */ { - zend_auto_global *ag = Z_PTR_P(zv); - - zend_string_release(ag->name); - - free(ag); + free(Z_PTR_P(zv)); } /* }}} */ @@ -471,7 +467,7 @@ static void auto_global_copy_ctor(zval *zv) /* {{{ */ zend_auto_global *old_ag = (zend_auto_global *) Z_PTR_P(zv); zend_auto_global *new_ag = pemalloc(sizeof(zend_auto_global), 1); - new_ag->name = zend_string_dup(old_ag->name, 1); + new_ag->name = old_ag->name; new_ag->auto_global_callback = old_ag->auto_global_callback; new_ag->jit = old_ag->jit;