Skip to content

Commit 7c79a91

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: intl: Fix memory leak on error in locale_filter_matches()
2 parents 5a427ce + 28ce1b0 commit 7c79a91

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ PHP NEWS
2525
. Fixed bug GH-20070 (Return type violation in imagefilter when an invalid
2626
filter is provided). (Girgias)
2727

28+
- Intl:
29+
. Fix memory leak on error in locale_filter_matches(). (nielsdos)
30+
2831
- LibXML:
2932
. Fix not thread safe schema/relaxng calls. (SpencerMalone, nielsdos)
3033

ext/intl/locale/locale_methods.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,6 +1290,7 @@ PHP_FUNCTION(locale_filter_matches)
12901290
/* canonicalize lang_tag */
12911291
can_lang_tag = get_icu_value_internal( lang_tag , LOC_CANONICALIZE_TAG , &result , 0);
12921292
if( result <=0) {
1293+
zend_string_release_ex( can_loc_range, false );
12931294
intl_error_set( NULL, status,
12941295
"locale_filter_matches : unable to canonicalize lang_tag" , 0 );
12951296
RETURN_FALSE;

0 commit comments

Comments
 (0)