diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-11-07 14:32:03 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-11-07 14:32:03 +0100 |
commit | ea6d22cfad64f052284f0987d47668fce5865649 (patch) | |
tree | b625f9fbfd0bc4eb7ce824bbc22ddf6152892589 /ext/pcre/php_pcre.c | |
parent | e9bdb5cd08044debeb50a70b3274b11249402be3 (diff) | |
parent | e19f0e86dc4ed3395595ca87b02d2d62389c4ee0 (diff) | |
download | php-git-ea6d22cfad64f052284f0987d47668fce5865649.tar.gz |
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix php_pcre_mutex_free()
Diffstat (limited to 'ext/pcre/php_pcre.c')
-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 1e5f6105ea..d3c84aef9f 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -81,8 +81,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 |