summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2012-10-18 20:11:32 +0800
committerXinchen Hui <laruence@php.net>2012-10-18 20:11:32 +0800
commit1f8fd609b0a61cc4e7815f93a0932b11b697e3a4 (patch)
tree638d4bd0376c5cdded6ee6bbe2739dc7f7e838f9
parent54cef2bb6d4d0527ac161b900b0b475d2ce312fb (diff)
parente88cdaa0143aacd2d765eb0560452ea28e327e41 (diff)
downloadphp-git-1f8fd609b0a61cc4e7815f93a0932b11b697e3a4.tar.gz
Merge branch 'PHP-5.3' into PHP-5.4
-rw-r--r--Zend/zend_variables.c2
-rw-r--r--ext/pcre/php_pcre.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c
index 70e61122a8..25a66a197c 100644
--- a/Zend/zend_variables.c
+++ b/Zend/zend_variables.c
@@ -40,6 +40,8 @@ ZEND_API void _zval_dtor_func(zval *zvalue ZEND_FILE_LINE_DC)
TSRMLS_FETCH();
if (zvalue->value.ht && (zvalue->value.ht != &EG(symbol_table))) {
+ /* break possible cycles */
+ Z_TYPE_P(zvalue) = IS_NULL;
zend_hash_destroy(zvalue->value.ht);
FREE_HASHTABLE(zvalue->value.ht);
}
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 4daed05ba1..be83cb6886 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -555,9 +555,8 @@ PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, char *subject, int subjec
/* Overwrite the passed-in value for subpatterns with an empty array. */
if (subpats != NULL) {
- zval garbage = *subpats;
+ zval_dtor(subpats);
array_init(subpats);
- zval_dtor(&garbage);
}
subpats_order = global ? PREG_PATTERN_ORDER : 0;