summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2018-09-09 10:42:53 +0200
committerAnatol Belski <ab@php.net>2018-09-09 10:42:53 +0200
commit68c34ce0dcf251169f9c41b4df66c06cd6993c5e (patch)
tree17a8126a3d95916e40c2e3b1f82eb094f043e0a6 /ext/pcre/php_pcre.c
parent9278be148e751bc6d2107f4df667f6a6de4daa66 (diff)
downloadphp-git-68c34ce0dcf251169f9c41b4df66c06cd6993c5e.tar.gz
Make a copy unconditionally
Diffstat (limited to 'ext/pcre/php_pcre.c')
-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 7aa879d26d..5165209b85 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -739,7 +739,7 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(zend_string *regex)
efree(pattern);
return NULL;
}
- _k = zend_string_dup(BG(locale_string), 1);
+ _k = zend_string_init(ZSTR_VAL(BG(locale_string)), ZSTR_LEN(BG(locale_string)), 1);
zend_hash_add_ptr(&char_tables, _k, (void *)tables);
zend_string_release(_k);
}