diff options
author | Rasmus Lerdorf <rasmus@php.net> | 2011-08-05 22:39:40 +0000 |
---|---|---|
committer | Rasmus Lerdorf <rasmus@php.net> | 2011-08-05 22:39:40 +0000 |
commit | c9342c81d68543d3d4ae6bb3c60d7e3cba267559 (patch) | |
tree | d9e483b6e0b1b8de89f8c4a8419738893e0d5921 | |
parent | dc1e148165c81e6e638fd592e3e8afc6fb1f154a (diff) | |
download | php-git-c9342c81d68543d3d4ae6bb3c60d7e3cba267559.tar.gz |
efree match_sets on an error here - found by Coverity
-rw-r--r-- | ext/pcre/php_pcre.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |