ICU-9979 Fix some memory clean up errors

X-SVN-Rev: 33320
This commit is contained in:
Michael Ow 2013-02-25 19:09:10 +00:00
parent 7f78f553e6
commit d637feebce
4 changed files with 4 additions and 2 deletions

View File

@ -128,7 +128,7 @@ const TimeZone* DangiCalendar::getDangiCalZoneAstroCalc(void) const {
gDangiCalendarZoneAstroCalc = NULL;
}
gDangiCalendarZoneAstroCalcInitialized = TRUE;
ucln_i18n_registerCleanup(UCLN_I18N_CHINESE_CALENDAR, calendar_dangi_cleanup);
ucln_i18n_registerCleanup(UCLN_I18N_DANGI_CALENDAR, calendar_dangi_cleanup);
}
}
umtx_unlock(&dangiLock);

View File

@ -34,6 +34,7 @@ typedef enum ECleanupI18NType {
UCLN_I18N_CHINESE_CALENDAR,
UCLN_I18N_HEBREW_CALENDAR,
UCLN_I18N_ASTRO_CALENDAR,
UCLN_I18N_DANGI_CALENDAR,
UCLN_I18N_CALENDAR,
UCLN_I18N_TIMEZONEFORMAT,
UCLN_I18N_TIMEZONEGENERICNAMES,

View File

@ -776,7 +776,6 @@ void TestSafeClone() {
In the meantime, just turn the following former error into a log message. */
log_verbose("NOTE: Cloned collator did not use provided buffer, index %d, status %s, clone NULL? %d\n",
idx, myErrorName(err), someClonedCollators[idx] == NULL);
return;
}
if (!ucol_equals(someClonedCollators[idx], someCollators[idx])) {
log_err("FAIL: Cloned collator is not equal to original at index = %d.\n", idx);

View File

@ -653,6 +653,7 @@ static void testCollator(UCollator *coll, UErrorCode *status) {
}
}
uprv_free(src.source);
uprv_free(src.reorderCodes);
}
}
@ -1287,6 +1288,7 @@ static void testCEs(UCollator *coll, UErrorCode *status) {
lastContCE = currContCE & 0xFFFFFFBF;
}
uprv_free(src.source);
uprv_free(src.reorderCodes);
}
ucol_close(UCA);
uprv_delete_collIterate(c);