From 520ab72e19e318023800b9d140030bdcf94b10bf Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Tue, 3 Oct 2006 20:42:57 +0000 Subject: [PATCH] don't forget to increase refcount when adding entry to the return_value --- ext/pcre/php_pcre.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 55e4ea5480..c8a6831e74 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -1868,6 +1868,7 @@ PHPAPI void php_pcre_grep_impl(pcre_cache_entry *pce, zval *input, zval *return /* If the entry fits our requirements */ if ((count > 0 && !invert) || (count == PCRE_ERROR_NOMATCH && invert)) { + (*entry)->refcount++; /* Add to return array */ switch (zend_hash_get_current_key_ex(Z_ARRVAL_P(input), &string_key, &string_key_len, &num_key, 0, NULL)) -- 2.50.1