mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
fix leaking of locale_string in TS build
actually more like an attempt as i see the leaks on travis, but don't repro on my boxes
This commit is contained in:
parent
65aba8bd71
commit
44cbba100a
@ -4550,11 +4550,12 @@ PHP_FUNCTION(setlocale)
|
||||
}
|
||||
if (len == loc->len && !memcmp(loc->val, retval, len)) {
|
||||
BG(locale_string) = zend_string_copy(loc);
|
||||
RETURN_STR(BG(locale_string));
|
||||
} else {
|
||||
BG(locale_string) = zend_string_init(retval, len, 0);
|
||||
zend_string_release(loc);
|
||||
RETURN_STR(zend_string_copy(BG(locale_string)));
|
||||
}
|
||||
RETURN_STR(zend_string_copy(BG(locale_string)));
|
||||
} else if (len == loc->len && !memcmp(loc->val, retval, len)) {
|
||||
RETURN_STR(loc);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user