ICU-9344 fix rare memory leak in ucol.cpp

X-SVN-Rev: 31858
This commit is contained in:
Andy Heninger 2012-05-25 18:25:38 +00:00
parent b957edd0b9
commit f7c10f5686

View File

@ -6260,6 +6260,7 @@ ucol_setUpLatinOne(UCollator *coll, UErrorCode *status) {
UCollationElements *it = ucol_openElements(coll, &ch, 1, status);
// Check for null pointer
if (U_FAILURE(*status)) {
ucol_closeElements(it);
return FALSE;
}
uprv_memset(coll->latinOneCEs, 0, sizeof(uint32_t)*coll->latinOneTableLen*3);