mirror of
https://github.com/php/php-src.git
synced 2025-01-10 21:14:37 +08:00
fix #33614 (memory leak in new strftime())
This commit is contained in:
parent
76a447c900
commit
d705522bbe
@ -645,6 +645,10 @@ PHPAPI void php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gmt)
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!gmt) {
|
||||
timelib_tzinfo_dtor(tzi);
|
||||
}
|
||||
|
||||
buf = (char *) emalloc(buf_len);
|
||||
while ((real_len=strftime(buf, buf_len, format, &ta))==buf_len || real_len==0) {
|
||||
buf_len *= 2;
|
||||
|
Loading…
Reference in New Issue
Block a user