summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.c
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2011-08-05 22:39:40 +0000
committerRasmus Lerdorf <rasmus@php.net>2011-08-05 22:39:40 +0000
commit741f41ff1896030ecf2d28853644753696603c37 (patch)
tree0423f21bba5660b28881b58083f8aee11e9ac174 /ext/pcre/php_pcre.c
parent2b6a290d5571fb3e3950cfdf8cca9bfa22bd18f9 (diff)
downloadphp-git-741f41ff1896030ecf2d28853644753696603c37.tar.gz
efree match_sets on an error here - found by Coverity
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r--ext/pcre/php_pcre.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 7989d1cfd8..9311fc13f3 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;
}