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 | f7e07ae69b94bc5a735b7be8234b37d7d2fb338d (patch) | |
tree | f75bbe87736d63b44fe42e1bcebe8bb089419180 /ext/pcre/php_pcre.c | |
parent | c1c2e18cb5980669d09179ed388fa201171dfba8 (diff) | |
download | php-git-f7e07ae69b94bc5a735b7be8234b37d7d2fb338d.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.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; } |