Fixed bug #72476 (Memleak in jit_stack)

This commit is contained in:
Xinchen Hui 2016-06-23 14:06:48 +08:00
parent f90c832cb2
commit bd74e7d013
2 changed files with 2 additions and 1 deletions

1
NEWS
View File

@ -13,6 +13,7 @@ PHP NEWS
. Fixed bug #72399 (Use-After-Free in MBString (search_re)). (Laruence)
- PCRE:
. Fixed bug #72476 (Memleak in jit_stack). (Laruence)
. Fixed bug #72463 (mail fails with invalid argument). (Anatol)
- Standard:

View File

@ -216,7 +216,7 @@ static PHP_MSHUTDOWN_FUNCTION(pcre)
/* {{{ PHP_RINIT_FUNCTION(pcre) */
static PHP_RINIT_FUNCTION(pcre)
{
if (PCRE_G(jit)) {
if (PCRE_G(jit) && jit_stack == NULL) {
jit_stack = pcre_jit_stack_alloc(PCRE_JIT_STACK_MIN_SIZE,PCRE_JIT_STACK_MAX_SIZE);
}