diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c index 6f5158fcb46..8b63007c5d8 100644 --- a/ext/intl/locale/locale_methods.c +++ b/ext/intl/locale/locale_methods.c @@ -1492,6 +1492,7 @@ static zend_string* lookup_loc_range(const char* loc_range, HashTable* hash_arr, zend_string_release_ex(can_loc_range, 0); } if(result == 0) { + efree(cur_loc_range); intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "lookup_loc_range: unable to canonicalize lang_tag" , 0); LOOKUP_CLEAN_RETURN(NULL); }