From a8a17a72b06e6ea39a70eaf45ad2c3d6668e29ba Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Wed, 1 Nov 2017 10:25:10 +0800 Subject: RC manipulation cleanup --- ext/pcre/php_pcre.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'ext/pcre/php_pcre.c') 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) { -- cgit v1.2.1