diff options
author | Andrei Zmievski <andrei@php.net> | 2002-10-07 17:16:23 +0000 |
---|---|---|
committer | Andrei Zmievski <andrei@php.net> | 2002-10-07 17:16:23 +0000 |
commit | 6863d70ef325f922d8e8afc8491704f61c76e5fd (patch) | |
tree | fdaf38b3072a5bbd93742e0fdcfb0791137a1bc7 /ext | |
parent | c574bdf43349db6f2c710b6b76d6ce55e5b0fefd (diff) | |
download | php-git-6863d70ef325f922d8e8afc8491704f61c76e5fd.tar.gz |
Use a copy of locale instead of the original. Fixes bug #19482.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/pcre/php_pcre.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 44b0a7327e..084dd4958f 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -66,6 +66,7 @@ static void php_free_pcre_cache(void *data) pefree(pce->re, 1); #if HAVE_SETLOCALE if ((void*)pce->tables) pefree((void*)pce->tables, 1); + pefree(pce->locale, 1); #endif } @@ -302,7 +303,7 @@ PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *preg_ new_entry.extra = *extra; new_entry.preg_options = poptions; #if HAVE_SETLOCALE - new_entry.locale = locale; + new_entry.locale = pestrdup(locale, 1); new_entry.tables = tables; #endif zend_hash_update(&PCRE_G(pcre_cache), regex, regex_len+1, (void *)&new_entry, |