summaryrefslogtreecommitdiff
path: root/ext/pcre
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2006-10-03 20:42:57 +0000
committerAntony Dovgal <tony2001@php.net>2006-10-03 20:42:57 +0000
commit520ab72e19e318023800b9d140030bdcf94b10bf (patch)
treea09e542491337f30bba73bb5c875e14e0bb4c14f /ext/pcre
parent15e5832c260265853f79f4bf9f0dbd0228a92a64 (diff)
downloadphp-git-520ab72e19e318023800b9d140030bdcf94b10bf.tar.gz
don't forget to increase refcount when adding entry to the return_value
Diffstat (limited to 'ext/pcre')
-rw-r--r--ext/pcre/php_pcre.c1
1 files changed, 1 insertions, 0 deletions
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))