diff options
author | Xinchen Hui <laruence@gmail.com> | 2017-11-01 10:25:10 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2017-11-01 10:25:10 +0800 |
commit | a8a17a72b06e6ea39a70eaf45ad2c3d6668e29ba (patch) | |
tree | 4cae24e0c78f7580e707bcab3d19729eca3b318c /ext/pcre/php_pcre.c | |
parent | 0056f52f500f9056039e8976e1100c9f154daa75 (diff) | |
download | php-git-a8a17a72b06e6ea39a70eaf45ad2c3d6668e29ba.tar.gz |
RC manipulation cleanup
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r-- | ext/pcre/php_pcre.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 24952beb07..ebf84c0c58 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -2602,9 +2602,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)) { - if (Z_REFCOUNTED_P(entry)) { - Z_ADDREF_P(entry); - } + Z_TRY_ADDREF_P(entry); /* Add to return array */ if (string_key) { |