Skip to content

Commit be4b987

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

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ PHP NEWS
1212
. Fixed a crash in DOMXPath when a php:function callback receives a nodeset
1313
and a later callback returns a node from another document. (iliaal)
1414

15+
- Intl:
16+
. Fixed a double-free when IntlGregorianCalendar construction fails after
17+
the ICU constructor adopts the TimeZone. (iliaal)
18+
1519
- Opcache:
1620
. Fixed opcache.protect_memory race under ZTS. (realFlowControl)
1721

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)