com php-src: Fixed bug #72982 (Memory leak in zend_accel_bl acklist_update_regexp() function): NEWS ext/o pcache/zend_accelerator_blacklist.c
| From: | Xinchen Hui | Date: | Thu, 01 Sep 2016 04:10:38 +0000 |
| Subject: | com php-src: Fixed bug #72982 (Memory leak in zend_accel_bl acklist_update_regexp() function): NEWS ext/o pcache/zend_accelerator_blacklist.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-94225@lists.php.net to get a copy of this message | ||
Commit: 1ee41683dc361a8d1bd0048f2218d24207b5e872
Author: Xinchen Hui <laruence@gmail.com> Thu, 1 Sep 2016 12:10:38 +0800
Parents: cc797d4fc3e6de1a21cbe91f810767cc491c7696
Branches: PHP-7.0 PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1ee41683dc361a8d1bd0048f2218d24207b5e872
Log:
Fixed bug #72982 (Memory leak in zend_accel_blacklist_update_regexp() function)
Bugs:
https://bugs.php.net/72982
Changed paths:
M NEWS
M ext/opcache/zend_accelerator_blacklist.c
Diff:
diff --git a/NEWS b/NEWS
index 2271967..9d4b2ec 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,10 @@ PHP NEWS
- mbstring:
. Fixed bug #66797 (mb_substr only takes 32-bit signed integer). (cmb)
+- Opcache:
+ . Fixed bug #72982 (Memory leak in zend_accel_blacklist_update_regexp()
+ function). (Laruence)
+
- SOAP:
. Fixed bug #71711 (Soap Server Member variables reference bug). (Nikita)
. Fixed bug #71996 (Using references in arrays doesn't work like expected).
diff --git a/ext/opcache/zend_accelerator_blacklist.c b/ext/opcache/zend_accelerator_blacklist.c
index df6abe8..db61e1e 100644
--- a/ext/opcache/zend_accelerator_blacklist.c
+++ b/ext/opcache/zend_accelerator_blacklist.c
@@ -178,7 +178,9 @@ static void zend_accel_blacklist_update_regexp(zend_blacklist *blacklist)
it->next = NULL;
if ((it->re = pcre_compile(regexp, PCRE_NO_AUTO_CAPTURE, &pcre_error,
&pcre_error_offset, 0)) == NULL) {
+ free(it);
blacklist_report_regexp_error(pcre_error, pcre_error_offset);
+ return;
}
/* prepare for the next iteration */
p = regexp + 2;