]> granicus.if.org Git - php/commitdiff
efree match_sets on an error here - found by Coverity
authorRasmus Lerdorf <rasmus@php.net>
Fri, 5 Aug 2011 22:39:40 +0000 (22:39 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Fri, 5 Aug 2011 22:39:40 +0000 (22:39 +0000)
ext/pcre/php_pcre.c

index 7989d1cfd807747766a1671c24102fe4fad8e8cc..9311fc13f3edf788929ca49294863220ca1e0429 100644 (file)
@@ -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;
                                }