]> granicus.if.org Git - php/commitdiff
don't forget to increase refcount when adding entry to the return_value
authorAntony Dovgal <tony2001@php.net>
Tue, 3 Oct 2006 20:42:57 +0000 (20:42 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 3 Oct 2006 20:42:57 +0000 (20:42 +0000)
ext/pcre/php_pcre.c

index 55e4ea5480dc541685e641d2a9f7e5af673501e0..c8a6831e74b9852b66df75c1d98497d251ffcbf6 100644 (file)
@@ -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))