mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 08:53:20 +00:00
ICU-770 fixed a leak in getSortKey...
X-SVN-Rev: 6650
This commit is contained in:
parent
34b31328c7
commit
48b6e3ca60
1 changed files with 6 additions and 2 deletions
|
@ -3416,7 +3416,11 @@ ucol_calcSortKey(const UCollator *coll,
|
|||
}
|
||||
|
||||
if(resultLength == 0 || primaries == NULL) {
|
||||
return ucol_getSortKeySize(coll, &s, sortKeySize, strength, len);
|
||||
int32_t keyLen = ucol_getSortKeySize(coll, &s, sortKeySize, strength, len);
|
||||
if(normSource != normBuffer) {
|
||||
uprv_free(normSource);
|
||||
}
|
||||
return keyLen;
|
||||
}
|
||||
uint8_t *primarySafeEnd = primaries + resultLength - 2;
|
||||
|
||||
|
@ -3924,7 +3928,7 @@ ucol_calcSortKeySimpleTertiary(const UCollator *coll,
|
|||
int32_t t = ucol_getSortKeySize(coll, &s, sortKeySize, coll->strength, len);
|
||||
if(normSource != normBuffer) {
|
||||
uprv_free(normSource);
|
||||
}
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue