From 8bd5e15ff7a57791956c4017ee8fb4a8ac0d8d2e Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Thu, 18 Oct 2012 17:31:27 +0800 Subject: Fixed bug #63055 (Segfault in zend_gc with SF2 testsuite) --- ext/pcre/php_pcre.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ext/pcre/php_pcre.c') diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index b1b9e66e9a..1af8151251 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -547,8 +547,9 @@ 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_dtor(subpats); + zval garbage = *subpats; array_init(subpats); + zval_dtor(&garbage); } subpats_order = global ? PREG_PATTERN_ORDER : 0; -- cgit v1.2.1