From: Antony Dovgal Date: Tue, 3 Oct 2006 20:42:57 +0000 (+0000) Subject: don't forget to increase refcount when adding entry to the return_value X-Git-Tag: RELEASE_1_0_0RC1~1445 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=520ab72e19e318023800b9d140030bdcf94b10bf;p=php don't forget to increase refcount when adding entry to the return_value --- 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))