From: Xinchen Hui Date: Wed, 21 Jan 2015 04:03:19 +0000 (+0800) Subject: Fixed valgrind reported issue with setlocale X-Git-Tag: PRE_PHP7_REMOVALS~25^2~61 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fa06343d7e0e04f4a660218f6dbb7ce18c3f090b;p=php Fixed valgrind reported issue with setlocale --- diff --git a/ext/standard/string.c b/ext/standard/string.c index dc69a8a3ac..6d5b1f223e 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -4550,7 +4550,7 @@ PHP_FUNCTION(setlocale) } if (len == loc->len && !memcmp(loc->val, retval, len)) { BG(locale_string) = zend_string_copy(loc); - RETURN_STR(BG(locale_string)); + RETURN_STR(zend_string_copy(BG(locale_string))); } else { BG(locale_string) = zend_string_init(retval, len, 0); zend_string_release(loc);