From: Xinchen Hui Date: Thu, 1 Sep 2016 04:10:38 +0000 (+0800) Subject: Fixed bug #72982 (Memory leak in zend_accel_blacklist_update_regexp() function) X-Git-Tag: php-7.1.0RC2~56^2~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1ee41683dc361a8d1bd0048f2218d24207b5e872;p=php Fixed bug #72982 (Memory leak in zend_accel_blacklist_update_regexp() function) --- diff --git a/NEWS b/NEWS index 2271967d47..9d4b2ec60a 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 df6abe8519..db61e1e9d3 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;