Skip to content

Fix IntlGregorianCalendar double-free of an adopted TimeZone - #232

Closed
iliaal wants to merge 1 commit into
masterfrom
fix/intl-gcal-adopt-df
Closed

Fix IntlGregorianCalendar double-free of an adopted TimeZone#232
iliaal wants to merge 1 commit into
masterfrom
fix/intl-gcal-adopt-df

Conversation

@iliaal

@iliaal iliaal commented Aug 16, 2026

Copy link
Copy Markdown
Owner

The timezone-and-locale IntlGregorianCalendar constructor passes the TimeZone to an adopting ICU constructor. On failure PHP deleted that zone again after unique_ptr already destroyed the calendar. Remove the extra delete.

GregorianCalendar(TimeZone*, ...) adopts the zone in the constructor.
On U_FAILURE the unique_ptr destructor already deletes the calendar
and its zone. Remove the extra delete tz.
@iliaal

iliaal commented Aug 16, 2026

Copy link
Copy Markdown
Owner Author

Promoted: php#23321

@iliaal iliaal closed this Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant