Skip to content

Close the keyword UEnumeration on Locale::getKeywords failure - #241

Closed
iliaal wants to merge 1 commit into
PHP-8.4from
fix/intl-keywords-uenum-leak
Closed

Close the keyword UEnumeration on Locale::getKeywords failure#241
iliaal wants to merge 1 commit into
PHP-8.4from
fix/intl-keywords-uenum-leak

Conversation

@iliaal

@iliaal iliaal commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Locale::getKeywords() destroyed the result array and returned when uloc_getKeywordValue() failed, without uenum_close(). Close the enumeration on that path. The success path already does.

@iliaal
iliaal changed the base branch from master to PHP-8.4 August 18, 2026 00:40
@iliaal
iliaal force-pushed the fix/intl-keywords-uenum-leak branch 2 times, most recently from 0e6460c to ced283d Compare August 18, 2026 00:41
uloc_getKeywordValue failure destroyed the result array and returned
without uenum_close(). Close the enumeration on that path. The success
path already closes it.

Audited the other uenum_close site in this file (acceptLanguage).
@iliaal
iliaal force-pushed the fix/intl-keywords-uenum-leak branch from ced283d to 5901e4e Compare August 18, 2026 11:55
@iliaal

iliaal commented Aug 18, 2026

Copy link
Copy Markdown
Owner Author

Promoted upstream: php#23351

@iliaal iliaal closed this Aug 18, 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