Skip to content

Commit

Permalink
ICU-22824 Fix mem Leak during error in uidna.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankYFTang committed Aug 5, 2024
1 parent bca5fa5 commit 4986790
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions icu4c/source/common/uidna.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,9 @@ _internal_toUnicode(const char16_t* src, int32_t srcLength,
if(b2 != b2Stack){
uprv_free(b2);
}
if(b3 != b3Stack){
uprv_free(b3);
}
uprv_free(caseFlags);

// The RFC states that
Expand Down

0 comments on commit 4986790

Please sign in to comment.