From 9c1baa304690a970b458a98cd913519645281731 Mon Sep 17 00:00:00 2001 From: "ben%bengoodger.com" Date: Tue, 12 Oct 2004 00:08:45 +0000 Subject: [PATCH] 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 --- xpfe/components/search/src/nsInternetSearchService.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xpfe/components/search/src/nsInternetSearchService.cpp b/xpfe/components/search/src/nsInternetSearchService.cpp index d57a6ab5c99..860317c493a 100755 --- a/xpfe/components/search/src/nsInternetSearchService.cpp +++ b/xpfe/components/search/src/nsInternetSearchService.cpp @@ -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())