263928 - followup - potential for memory to be freed before access due to literal string going out of scope - use a named literal string in the parent scope block instead. r+sr=brendan

This commit is contained in:
ben%bengoodger.com 2004-10-12 00:08:45 +00:00
Родитель 9fac6dcc45
Коммит 9c1baa3046
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -4888,8 +4888,8 @@ InternetSearchDataSource::GetInputs(const PRUnichar *dataUni, nsString &engineNa
keyTemplate.Append(NS_LITERAL_STRING(".release"));
nsXPIDLString releaseValue;
const PRUnichar* strings[] = { NS_LITERAL_STRING(MOZ_DISTRIBUTION_ID).get(),
langName.get() };
NS_NAMED_LITERAL_STRING(distributionID, MOZ_DISTRIBUTION_ID);
const PRUnichar* strings[] = { distributionID.get(), langName.get() };
bundle->FormatStringFromName(keyTemplate.get(), strings, 2, getter_Copies(releaseValue));
if (!releaseValue.IsEmpty())