mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 22:44:49 +00:00
ICU-4559 Fix memory leaks
X-SVN-Rev: 18271
This commit is contained in:
parent
535e77b8de
commit
766fb06f3c
4 changed files with 6 additions and 0 deletions
|
@ -121,10 +121,12 @@ UBool IdnaConfTest::ReadAndConvertFile(){
|
|||
len = dest_len;
|
||||
base = dest;
|
||||
delete [] source;
|
||||
ucnv_close(conv);
|
||||
return TRUE; // The buffer will owned by caller.
|
||||
}
|
||||
errln("UConverter error: %s", u_errorName(status));
|
||||
delete [] source;
|
||||
ucnv_close(conv);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -638,6 +638,7 @@ void IntlCalendarTest::TestJapanese3860()
|
|||
#endif
|
||||
delete cal2;
|
||||
delete cal;
|
||||
delete fmt2;
|
||||
}
|
||||
|
||||
void IntlCalendarTest::simpleTest(const Locale& loc, const UnicodeString& expect, UDate expectDate, UErrorCode& status)
|
||||
|
|
|
@ -1526,6 +1526,7 @@ void NumberFormatTest::TestCurrencyUnit(void){
|
|||
if (!(*cu3 == cu)){
|
||||
errln("CurrencyUnit cloned object should be same");
|
||||
}
|
||||
delete cu3;
|
||||
}
|
||||
|
||||
void NumberFormatTest::TestCurrencyAmount(void){
|
||||
|
@ -1548,6 +1549,7 @@ void NumberFormatTest::TestCurrencyAmount(void){
|
|||
if (!(*ca3 == ca)){
|
||||
errln("CurrencyAmount cloned object should be same");
|
||||
}
|
||||
delete ca3;
|
||||
}
|
||||
|
||||
void NumberFormatTest::TestSymbolsWithBadLocale(void) {
|
||||
|
|
|
@ -851,6 +851,7 @@ void UTextTest::ErrorTest()
|
|||
TEST_ASSERT(buf[1] == 0xfffd);
|
||||
TEST_ASSERT(buf[3] == 0xfffd);
|
||||
TEST_ASSERT(buf[2] == 0x42);
|
||||
utext_close(ut);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue