com php-src: Fixed refcounting: Zend/zend_execute_API.c
| From: | Dmitry Stogov | Date: | Thu, 20 Mar 2014 20:34:26 +0000 |
| Subject: | com php-src: Fixed refcounting: Zend/zend_execute_API.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77574@lists.php.net to get a copy of this message | ||
Commit: cce7d5a1eceed880e4d44bc19f644237dc5a3615
Author: Dmitry Stogov <dmitry@zend.com> Fri, 21 Mar 2014 00:34:26 +0400
Parents: ee0ecc83d52f4ded26eeb5010edb25af5c90ce10
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=cce7d5a1eceed880e4d44bc19f644237dc5a3615
Log:
Fixed refcounting
Changed paths:
M Zend/zend_execute_API.c
Diff:
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 4ffa199..b3dc41a 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -640,6 +640,7 @@ ZEND_API int zval_update_constant_ex(zval *p, void *arg, zend_class_entry *scope
switch (Z_TYPE(const_value)) {
case IS_STRING:
+ Z_ADDREF(const_value);
ret = zend_symtable_update_current_key(Z_ARRVAL_P(p), Z_STR(const_value),
HASH_UPDATE_KEY_IF_BEFORE);
break;
case IS_BOOL:
@@ -659,7 +660,7 @@ ZEND_API int zval_update_constant_ex(zval *p, void *arg, zend_class_entry *scope
if (ret == SUCCESS) {
zend_hash_move_forward(Z_ARRVAL_P(p));
}
- zval_dtor(&const_value);
+ zval_ptr_dtor(&const_value);
}
zend_hash_apply_with_argument(Z_ARRVAL_P(p), (apply_func_arg_t)
zval_update_constant_inline_change, (void *) scope TSRMLS_CC);
zend_hash_internal_pointer_reset(Z_ARRVAL_P(p));