From: Antony Dovgal Date: Tue, 19 Sep 2006 11:48:59 +0000 (+0000) Subject: fix leak in preg_split() X-Git-Tag: RELEASE_1_0_0RC1~1626 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d42e808a334445ba71681074ad8ccd4877a431c;p=php fix leak in preg_split() --- diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 6854106ca6..de6853ce5f 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -1485,11 +1485,11 @@ PHP_FUNCTION(preg_split) /* Compile regex or get it from cache. */ if ((pce = pcre_get_compiled_regex_cache(regex.s, regex_len TSRMLS_CC)) == NULL) { - RETURN_FALSE; if (str_type == IS_UNICODE) { efree(regex_utf8); efree(subject_utf8); } + RETURN_FALSE; } php_pcre_split_impl(pce, subject.s, subject_len, return_value, limit_val, flags TSRMLS_CC);