r=pedemont, sr=blizzard (platform specific code)
Fix locale object leak
This commit is contained in:
mkaply%us.ibm.com 2004-02-24 23:29:50 +00:00
Родитель 1f08909699
Коммит 568fef0439
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -99,7 +99,13 @@ nsresult nsCollationOS2::CompareString(const nsCollationStrength strength,
if (ret != ULS_SUCCESS)
UniCreateLocaleObject(UNI_UCS_STRING_POINTER, (UniChar *)L"en_US", &locObj);
*result = UniStrcoll(locObj, (UniChar *)stringNormalized1.get(), (UniChar *)stringNormalized2.get());
if (ret == ULS_SUCCESS) {
*result = UniStrcoll(locObj, (UniChar *)stringNormalized1.get(), (UniChar *)stringNormalized2.get());
} else {
return NS_ERROR_FAILURE;
}
UniFreeLocaleObject(locObj);
return NS_OK;
}