diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-03-07 17:17:35 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-03-07 17:17:35 +0400 |
commit | b671c3a28a6b72e2beb283cfc759c806d8d0bc01 (patch) | |
tree | bf089cc406a7493177c2bf819eb0bd8a2a75fcff /ext/pcre/php_pcre.c | |
parent | d599d0cecde196d2063d6b6b56d4ffebbaeab238 (diff) | |
download | php-git-b671c3a28a6b72e2beb283cfc759c806d8d0bc01.tar.gz |
Fixed refcounting
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r-- | ext/pcre/php_pcre.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index e15076072e..8a5b069ee8 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -1813,7 +1813,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)) { - Z_ADDREF_P(entry); + if (Z_REFCOUNTED_P(entry)) Z_ADDREF_P(entry); /* Add to return array */ switch (zend_hash_get_current_key_ex(Z_ARRVAL_P(input), &string_key, &num_key, 0, NULL)) |