diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-11-07 14:31:55 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-11-07 14:31:55 +0100 |
commit | e19f0e86dc4ed3395595ca87b02d2d62389c4ee0 (patch) | |
tree | 0d3780d6463db0ce5ea30e28e947bc39193ff3b7 | |
parent | aba89f56fff70af8adb0c1a2907162037a916d85 (diff) | |
parent | 6dcc0b859f5f31729ab3f1e776b067fb338b1978 (diff) | |
download | php-git-e19f0e86dc4ed3395595ca87b02d2d62389c4ee0.tar.gz |
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix php_pcre_mutex_free()
-rw-r--r-- | ext/pcre/php_pcre.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index d19c7960a6..559836e679 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -83,8 +83,10 @@ ZEND_TLS zend_bool mdata_used = 0; ZEND_TLS uint8_t pcre2_init_ok = 0; #if defined(ZTS) && defined(HAVE_PCRE_JIT_SUPPORT) static MUTEX_T pcre_mt = NULL; -#define php_pcre_mutex_alloc() if (tsrm_is_main_thread() && !pcre_mt) pcre_mt = tsrm_mutex_alloc(); -#define php_pcre_mutex_free() if (tsrm_is_main_thread() && pcre_mt) tsrm_mutex_free(pcre_mt); pcre_mt = NULL; +#define php_pcre_mutex_alloc() \ + if (tsrm_is_main_thread() && !pcre_mt) pcre_mt = tsrm_mutex_alloc(); +#define php_pcre_mutex_free() \ + if (tsrm_is_main_thread() && 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 |