svn: /php/php-src/ branches/PHP_5_3/ext/pcre/php_pcre.c branches/PHP_5_4/ext/pcre/php_pcre.c trunk/ext/pcre/php_pcre.c
| From: | Rasmus Lerdorf | Date: | Fri, 05 Aug 2011 22:39:40 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/ext/pcre/php_pcre.c branches/PHP_5_4/ext/pcre/php_pcre.c trunk/ext/pcre/php_pcre.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-65705@lists.php.net to get a copy of this message | ||
rasmus Fri, 05 Aug 2011 22:39:40 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=314349
Log:
efree match_sets on an error here - found by Coverity
Changed paths:
U php/php-src/branches/PHP_5_3/ext/pcre/php_pcre.c
U php/php-src/branches/PHP_5_4/ext/pcre/php_pcre.c
U php/php-src/trunk/ext/pcre/php_pcre.c
Modified: php/php-src/branches/PHP_5_3/ext/pcre/php_pcre.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/pcre/php_pcre.c 2011-08-05 22:26:16 UTC (rev 314348)
+++ php/php-src/branches/PHP_5_3/ext/pcre/php_pcre.c 2011-08-05 22:39:40 UTC (rev 314349)
@@ -644,6 +644,7 @@
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;
}
Modified: php/php-src/branches/PHP_5_4/ext/pcre/php_pcre.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/pcre/php_pcre.c 2011-08-05 22:26:16 UTC (rev 314348)
+++ php/php-src/branches/PHP_5_4/ext/pcre/php_pcre.c 2011-08-05 22:39:40 UTC (rev 314349)
@@ -644,6 +644,7 @@
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;
}
Modified: php/php-src/trunk/ext/pcre/php_pcre.c
===================================================================
--- php/php-src/trunk/ext/pcre/php_pcre.c 2011-08-05 22:26:16 UTC (rev 314348)
+++ php/php-src/trunk/ext/pcre/php_pcre.c 2011-08-05 22:39:40 UTC (rev 314349)
@@ -644,6 +644,7 @@
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;
}