Skip to content

Commit 092fd44

Browse files
committed
Fix use after free revealed by phpdbg
1 parent 31b2b14 commit 092fd44

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
@@ -70,7 +70,7 @@ ZEND_TLS pcre_jit_stack *jit_stack = NULL;
7070
#if defined(ZTS) && defined(HAVE_PCRE_JIT_SUPPORT)
7171
static MUTEX_T pcre_mt = NULL;
7272
#define php_pcre_mutex_alloc() if (!pcre_mt) pcre_mt = tsrm_mutex_alloc();
73-
#define php_pcre_mutex_free() if (pcre_mt) tsrm_mutex_free(pcre_mt);
73+
#define php_pcre_mutex_free() if (pcre_mt) tsrm_mutex_free(pcre_mt); pcre_mt = NULL;
7474
#define php_pcre_mutex_lock() tsrm_mutex_lock(pcre_mt);
7575
#define php_pcre_mutex_unlock() tsrm_mutex_unlock(pcre_mt);
7676
#else

0 commit comments

Comments
 (0)