From: Rasmus Lerdorf Date: Fri, 5 Aug 2011 22:39:40 +0000 (+0000) Subject: efree match_sets on an error here - found by Coverity X-Git-Tag: php-5.4.0beta1~524 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f7e07ae69b94bc5a735b7be8234b37d7d2fb338d;p=php efree match_sets on an error here - found by Coverity --- diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 27bea79922..41fdb32a7b 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -644,6 +644,7 @@ PHPAPI void php_pcre_match_impl(pcre_cache_entry *pce, char *subject, int subjec if (pcre_get_substring_list(subject, offsets, count, &stringlist) < 0) { efree(subpat_names); efree(offsets); + if (match_sets) efree(match_sets); php_error_docref(NULL TSRMLS_CC, E_WARNING, "Get subpatterns list failed"); RETURN_FALSE; }