зеркало из https://github.com/mozilla/gecko-dev.git
r=pedemont, sr=blizzard (platform specific code) Fix locale object leak
This commit is contained in:
Родитель
1f08909699
Коммит
568fef0439
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче