mirror of
https://github.com/php/php-src.git
synced 2025-08-18 06:58:55 +02:00
Merge branch 'PHP-7.0'
* PHP-7.0: Updated NEWS Updated NEWS Backported bug #71144 (Segmentation fault when using cURL with ZTS) fix bug #72024 (microtime() leaks memory)
This commit is contained in:
commit
4b483cdc9a
1 changed files with 3 additions and 6 deletions
|
@ -196,7 +196,6 @@ static zend_string *php_hex2bin(const unsigned char *old, const size_t oldlen)
|
||||||
* glibc's localeconv is not reentrant, so lets make it so ... sorta */
|
* glibc's localeconv is not reentrant, so lets make it so ... sorta */
|
||||||
PHPAPI struct lconv *localeconv_r(struct lconv *out)
|
PHPAPI struct lconv *localeconv_r(struct lconv *out)
|
||||||
{
|
{
|
||||||
struct lconv *res;
|
|
||||||
|
|
||||||
# ifdef ZTS
|
# ifdef ZTS
|
||||||
tsrm_mutex_lock( locale_mutex );
|
tsrm_mutex_lock( locale_mutex );
|
||||||
|
@ -210,16 +209,14 @@ PHPAPI struct lconv *localeconv_r(struct lconv *out)
|
||||||
/* Even with the enabled per thread locale, localeconv
|
/* Even with the enabled per thread locale, localeconv
|
||||||
won't check any locale change in the master thread. */
|
won't check any locale change in the master thread. */
|
||||||
_locale_t cur = _get_current_locale();
|
_locale_t cur = _get_current_locale();
|
||||||
|
*out = *cur->locinfo->lconv;
|
||||||
res = cur->locinfo->lconv;
|
_free_locale(cur);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
/* localeconv doesn't return an error condition */
|
/* localeconv doesn't return an error condition */
|
||||||
res = localeconv();
|
*out = *localeconv();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
*out = *res;
|
|
||||||
|
|
||||||
# ifdef ZTS
|
# ifdef ZTS
|
||||||
tsrm_mutex_unlock( locale_mutex );
|
tsrm_mutex_unlock( locale_mutex );
|
||||||
# endif
|
# endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue