com php-src: Partially fix bug #71129: Zend/zend.c
| From: | Anatol Belski | Date: | Sun, 20 Dec 2015 14:25:11 +0000 |
| Subject: | com php-src: Partially fix bug #71129: Zend/zend.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-90361@lists.php.net to get a copy of this message | ||
Commit: 4c55669caa96f6202c2047a7baf6c5d5894d5fa7
Author: Anatol Belski <ab@php.net> Sun, 20 Dec 2015 15:25:11 +0100
Parents: cfe977a4065216b253b41d0f1f329a170af275b1
Branches: PHP-7.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4c55669caa96f6202c2047a7baf6c5d5894d5fa7
Log:
Partially fix bug #71129
Bugs:
https://bugs.php.net/71129
Changed paths:
M Zend/zend.c
Diff:
diff --git a/Zend/zend.c b/Zend/zend.c
index d211f14..3a52200 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -448,7 +448,11 @@ static void zend_init_call_trampoline_op(void) /* {{{ */
static void auto_global_dtor(zval *zv) /* {{{ */
{
- free(Z_PTR_P(zv));
+ zend_auto_global *ag = Z_PTR_P(zv);
+
+ zend_string_release(ag->name);
+
+ free(ag);
}
/* }}} */
@@ -467,7 +471,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 = old_ag->name;
+ new_ag->name = zend_string_dup(old_ag->name, 1);
new_ag->auto_global_callback = old_ag->auto_global_callback;
new_ag->jit = old_ag->jit;