mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
better fix for #63055
This commit is contained in:
parent
8bd5e15ff7
commit
e88cdaa014
2 changed files with 3 additions and 2 deletions
|
@ -40,6 +40,8 @@ ZEND_API void _zval_dtor_func(zval *zvalue ZEND_FILE_LINE_DC)
|
||||||
TSRMLS_FETCH();
|
TSRMLS_FETCH();
|
||||||
|
|
||||||
if (zvalue->value.ht && (zvalue->value.ht != &EG(symbol_table))) {
|
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);
|
zend_hash_destroy(zvalue->value.ht);
|
||||||
FREE_HASHTABLE(zvalue->value.ht);
|
FREE_HASHTABLE(zvalue->value.ht);
|
||||||
}
|
}
|
||||||
|
|
|
@ -547,9 +547,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. */
|
/* Overwrite the passed-in value for subpatterns with an empty array. */
|
||||||
if (subpats != NULL) {
|
if (subpats != NULL) {
|
||||||
zval garbage = *subpats;
|
zval_dtor(subpats);
|
||||||
array_init(subpats);
|
array_init(subpats);
|
||||||
zval_dtor(&garbage);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
subpats_order = global ? PREG_PATTERN_ORDER : 0;
|
subpats_order = global ? PREG_PATTERN_ORDER : 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue