mirror of https://github.com/acidanthera/audk.git
Get the language string before use it to avoid reuse freed buffer.
Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14241 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
2426f6669f
commit
de12ae821c
|
@ -399,10 +399,10 @@ InitializeFrontPage (
|
|||
|
||||
CurrentLang = GetEfiGlobalVariable (L"PlatformLang");
|
||||
|
||||
if (gFrontPagePrivate.LanguageToken == NULL) {
|
||||
//
|
||||
// Get Support language list from variable.
|
||||
//
|
||||
//
|
||||
// Get Support language list from variable.
|
||||
//
|
||||
if (mLanguageString == NULL){
|
||||
mLanguageString = GetEfiGlobalVariable (L"PlatformLangCodes");
|
||||
if (mLanguageString == NULL) {
|
||||
mLanguageString = AllocateCopyPool (
|
||||
|
@ -411,7 +411,9 @@ InitializeFrontPage (
|
|||
);
|
||||
ASSERT (mLanguageString != NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (gFrontPagePrivate.LanguageToken == NULL) {
|
||||
//
|
||||
// Count the language list number.
|
||||
//
|
||||
|
@ -1223,6 +1225,7 @@ PlatformBdsEnterFrontPage (
|
|||
|
||||
if (mLanguageString != NULL) {
|
||||
FreePool (mLanguageString);
|
||||
mLanguageString = NULL;
|
||||
}
|
||||
//
|
||||
//Will leave browser, check any reset required change is applied? if yes, reset system
|
||||
|
|
Loading…
Reference in New Issue