Skip to content

Commit cb0b2a2

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: Fix memory leak in lookup_loc_range()
2 parents 08b616e + d39d261 commit cb0b2a2

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ PHP NEWS
2424

2525
- Intl:
2626
. Fix memory leak in intl_datetime_decompose() on failure. (nielsdos)
27+
. Fix memory leak in locale lookup on failure. (nielsdos)
2728

2829
- Phar:
2930
. Add missing filter cleanups on phar failure. (nielsdos)

ext/intl/locale/locale_methods.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,6 +1488,7 @@ static zend_string* lookup_loc_range(const char* loc_range, HashTable* hash_arr,
14881488
zend_string_release_ex(can_loc_range, 0);
14891489
}
14901490
if(result == 0) {
1491+
efree(cur_loc_range);
14911492
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "lookup_loc_range: unable to canonicalize lang_tag" , 0);
14921493
LOOKUP_CLEAN_RETURN(NULL);
14931494
}

0 commit comments

Comments
 (0)