From: Antony Dovgal Date: Tue, 3 Oct 2006 21:17:29 +0000 (+0000) Subject: fix leak X-Git-Tag: RELEASE_1_0_0RC1~1444 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=496ff9808a50ed818c235079136f1764e20e6515;p=php fix leak --- diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index c8a6831e74..1ae9d55162 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -1861,6 +1861,9 @@ PHPAPI void php_pcre_grep_impl(pcre_cache_entry *pce, zval *input, zval *return php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Matched, but too many substrings"); count = size_offsets/3; } else if (count < 0 && count != PCRE_ERROR_NOMATCH) { + if (Z_TYPE_PP(entry) != IS_STRING) { + zval_dtor(&subject); + } pcre_handle_exec_error(count TSRMLS_CC); break; }