ICU-5955 Fix a few crashes under error conditions.

X-SVN-Rev: 23277
This commit is contained in:
George Rhoten 2008-01-21 17:35:02 +00:00
parent e8e7c73d8a
commit a74869abf6
3 changed files with 10 additions and 8 deletions

View File

@ -1,7 +1,7 @@
/*
******************************************************************************
* *
* Copyright (C) 2001-2006, International Business Machines *
* Copyright (C) 2001-2008, International Business Machines *
* Corporation and others. All Rights Reserved. *
* *
******************************************************************************
@ -22,7 +22,8 @@
/*
Please keep the order of enums declared in same order
as the functions are suppose to be called. */
as the functions are suppose to be called.
It's usually best to have child dependencies called first. */
typedef enum ECleanupI18NType {
UCLN_I18N_START = -1,
UCLN_I18N_TRANSLITERATOR,
@ -32,17 +33,17 @@ typedef enum ECleanupI18NType {
UCLN_I18N_HEBREW_CALENDAR,
UCLN_I18N_ASTRO_CALENDAR,
UCLN_I18N_CALENDAR,
UCLN_I18N_NUMFMT,
UCLN_I18N_CURRENCY,
UCLN_I18N_ZONEMETA,
UCLN_I18N_ZSFORMAT,
UCLN_I18N_TIMEZONE,
UCLN_I18N_PLURAL_RULE,
UCLN_I18N_CURRENCY,
UCLN_I18N_NUMFMT,
UCLN_I18N_USEARCH,
UCLN_I18N_COLLATOR,
UCLN_I18N_UCOL,
UCLN_I18N_UCOL_BLD,
UCLN_I18N_CSDET,
UCLN_I18N_ZONEMETA,
UCLN_I18N_ZSFORMAT,
UCLN_I18N_PLURAL_RULE,
UCLN_I18N_COUNT /* This must be last */
} ECleanupI18NType;

View File

@ -173,7 +173,6 @@ void CalendarCaseTest::IslamicCivil()
if (fmt == NULL) {
dataerrln("Error calling DateFormat::createDateInstance");
delete c;
delete fmt;
return;
}

View File

@ -812,6 +812,7 @@ void CollationRegressionTest::Test4124632(/* char* par */)
{
errln("Failed to create collator for Locale::JAPAN");
delete coll;
return;
}
static const UChar test[] = {0x41, 0x0308, 0x62, 0x63, 0};
@ -844,6 +845,7 @@ void CollationRegressionTest::Test4132736(/* char* par */)
{
errln("Failed to create a collator for Locale::getFrance()");
delete c;
return;
}
static const UChar test1[][CollationRegressionTest::MAX_TOKEN_LEN] =