From 53bfb6618d13083b769014cbdcb845f787a7cf28 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 21 Dec 2015 12:09:24 +0100 Subject: [PATCH] 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. --- Zend/zend.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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; -- 2.40.0