mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 08:53:20 +00:00
ICU-4790 fix mismatched cases malloc / delete in spoof detector.
X-SVN-Rev: 25980
This commit is contained in:
parent
f0ee7cd65f
commit
7088240fd8
2 changed files with 7 additions and 7 deletions
|
@ -490,10 +490,10 @@ uspoof_areConfusable(const USpoofChecker *sc,
|
|||
}
|
||||
}
|
||||
if (s1Skeleton != s1SkeletonBuf) {
|
||||
delete s1Skeleton;
|
||||
uprv_free(s1Skeleton);
|
||||
}
|
||||
if (s2Skeleton != s2SkeletonBuf) {
|
||||
delete s2Skeleton;
|
||||
uprv_free(s2Skeleton);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -548,10 +548,10 @@ uspoof_areConfusableUTF8(const USpoofChecker *sc,
|
|||
int32_t results = uspoof_areConfusable(sc, s1U, lengthS1U, s2U, lengthS2U, status);
|
||||
|
||||
if (s1U != s1Buf) {
|
||||
delete s1U;
|
||||
uprv_free(s1U);
|
||||
}
|
||||
if (s2U != s2Buf) {
|
||||
delete s2U;
|
||||
uprv_free(s2U);
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
@ -794,10 +794,10 @@ uspoof_getSkeletonUTF8(const USpoofChecker *sc,
|
|||
|
||||
cleanup:
|
||||
if (inBuf != smallInBuf) {
|
||||
delete inBuf;
|
||||
uprv_free(inBuf);
|
||||
}
|
||||
if (outBuf != smallOutBuf) {
|
||||
delete outBuf;
|
||||
uprv_free(outBuf);
|
||||
}
|
||||
return skelLengthInUTF8;
|
||||
}
|
||||
|
|
|
@ -787,7 +787,7 @@ NFKDBuffer::NFKDBuffer(const UChar *text, int32_t length, UErrorCode &status) {
|
|||
|
||||
NFKDBuffer::~NFKDBuffer() {
|
||||
if (fNormalizedText != fSmallBuf) {
|
||||
delete fNormalizedText;
|
||||
uprv_free(fNormalizedText);
|
||||
}
|
||||
fNormalizedText = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue