summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2017-12-05 18:32:32 +0100
committerAnatol Belski <ab@php.net>2017-12-05 18:32:32 +0100
commit092fd44474676857359153c859e0cb300720d80a (patch)
tree852700eec066500465bf425dee0224e64e851636
parent31b2b14a712f9a8e6beddec4522e12484259422b (diff)
downloadphp-git-092fd44474676857359153c859e0cb300720d80a.tar.gz
Fix use after free revealed by phpdbg
-rw-r--r--ext/pcre/php_pcre.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 42e577e351..a743f30b04 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -70,7 +70,7 @@ ZEND_TLS pcre_jit_stack *jit_stack = NULL;
#if defined(ZTS) && defined(HAVE_PCRE_JIT_SUPPORT)
static MUTEX_T pcre_mt = NULL;
#define php_pcre_mutex_alloc() if (!pcre_mt) pcre_mt = tsrm_mutex_alloc();
-#define php_pcre_mutex_free() if (pcre_mt) tsrm_mutex_free(pcre_mt);
+#define php_pcre_mutex_free() if (pcre_mt) tsrm_mutex_free(pcre_mt); pcre_mt = NULL;
#define php_pcre_mutex_lock() tsrm_mutex_lock(pcre_mt);
#define php_pcre_mutex_unlock() tsrm_mutex_unlock(pcre_mt);
#else