Skip to content

Commit c621cbe

Browse files
committed
Merge branch 'PHP-8.5'
* PHP-8.5: Fix IntlGregorianCalendar double-free of an adopted TimeZone (#23321)
2 parents 9181736 + be4b987 commit c621cbe

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ PHP NEWS
3232
- Intl:
3333
. Fixed grapheme_strrev() treating UBRK_DONE as a byte index and leaving
3434
the result without a terminating NUL. (iliaal)
35+
. Fixed a double-free when IntlGregorianCalendar construction fails after
36+
the ICU constructor adopts the TimeZone. (iliaal)
3537

3638
- Phar:
3739
. Fixed Phar archives being automatically detected when ".phar" only occurs

ext/intl/calendar/gregoriancalendar_methods.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ static void _php_intlgregcal_constructor_body(INTERNAL_FUNCTION_PARAMETERS, bool
165165
if (U_FAILURE(status)) {
166166
intl_error_set(NULL, status, "error creating ICU "
167167
"GregorianCalendar from time zone and locale");
168-
delete tz;
169168
if (!is_constructor) {
170169
zval_ptr_dtor(return_value);
171170
RETVAL_NULL();

0 commit comments

Comments
 (0)