Skip to content

Commit 5f3a26c

Browse files
committed
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: Fixed bug #72982 (Memory leak in zend_accel_blacklist_update_regexp() function)
2 parents 4f07f0e + 1ee4168 commit 5f3a26c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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)