From 5d42e808a334445ba71681074ad8ccd4877a431c Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Tue, 19 Sep 2006 11:48:59 +0000 Subject: [PATCH] fix leak in preg_split() --- ext/pcre/php_pcre.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.50.1