]> 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 27bea79922ac52b619f945a1bde8f600f94264b1..41fdb32a7b4d3dd6a7dc5fdcb7166ffec62d4e9c 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;
                                }