Skip to content

Commit 1ee4168

Browse files
committed
Fixed bug #72982 (Memory leak in zend_accel_blacklist_update_regexp() function)
1 parent cc797d4 commit 1ee4168

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ PHP NEWS
55
- mbstring:
66
. Fixed bug #66797 (mb_substr only takes 32-bit signed integer). (cmb)
77

8+
- Opcache:
9+
. Fixed bug #72982 (Memory leak in zend_accel_blacklist_update_regexp()
10+
function). (Laruence)
11+
812
- SOAP:
913
. Fixed bug #71711 (Soap Server Member variables reference bug). (Nikita)
1014
. Fixed bug #71996 (Using references in arrays doesn't work like expected).

ext/opcache/zend_accelerator_blacklist.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ static void zend_accel_blacklist_update_regexp(zend_blacklist *blacklist)
178178
it->next = NULL;
179179

180180
if ((it->re = pcre_compile(regexp, PCRE_NO_AUTO_CAPTURE, &pcre_error, &pcre_error_offset, 0)) == NULL) {
181+
free(it);
181182
blacklist_report_regexp_error(pcre_error, pcre_error_offset);
183+
return;
182184
}
183185
/* prepare for the next iteration */
184186
p = regexp + 2;

0 commit comments

Comments
 (0)