Skip to content

Commit d4af204

Browse files
committed
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1: Fix use after free revealed by phpdbg
2 parents 75a2ee7 + 092fd44 commit d4af204

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/pcre/php_pcre.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ ZEND_TLS pcre_jit_stack *jit_stack = NULL;
7171
#if defined(ZTS) && defined(HAVE_PCRE_JIT_SUPPORT)
7272
static MUTEX_T pcre_mt = NULL;
7373
#define php_pcre_mutex_alloc() if (tsrm_is_main_thread() && !pcre_mt) pcre_mt = tsrm_mutex_alloc();
74-
#define php_pcre_mutex_free() if (tsrm_is_main_thread() && pcre_mt) tsrm_mutex_free(pcre_mt);
74+
#define php_pcre_mutex_free() if (tsrm_is_main_thread() && pcre_mt) tsrm_mutex_free(pcre_mt); pcre_mt = NULL;
7575
#define php_pcre_mutex_lock() tsrm_mutex_lock(pcre_mt);
7676
#define php_pcre_mutex_unlock() tsrm_mutex_unlock(pcre_mt);
7777
#else

0 commit comments

Comments
 (0)