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;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php