mirror of https://github.com/acidanthera/audk.git
Fix the bug that Boot Mainteinance Manager in the front page can not be entered twice or more.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8040 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
299b4cf312
commit
4376a6f273
|
@ -910,7 +910,7 @@ InitializeBM (
|
|||
NULL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -925,7 +925,7 @@ InitializeBM (
|
|||
NULL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -962,9 +962,8 @@ InitializeBM (
|
|||
gUpdateData.BufferSize = UPDATE_DATA_SIZE;
|
||||
gUpdateData.Data = AllocateZeroPool (UPDATE_DATA_SIZE);
|
||||
if (gUpdateData.Data == NULL) {
|
||||
FreePool (BmmCallbackInfo->LoadContext);
|
||||
FreePool (BmmCallbackInfo);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
InitializeStringDepository ();
|
||||
|
@ -1065,11 +1064,35 @@ InitializeBM (
|
|||
|
||||
FreeAllMenu ();
|
||||
|
||||
FreePool (BmmCallbackInfo->LoadContext);
|
||||
FreePool (BmmCallbackInfo);
|
||||
FreePool (gUpdateData.Data);
|
||||
gUpdateData.Data = NULL;
|
||||
|
||||
Exit:
|
||||
if (BmmCallbackInfo->FeDriverHandle != NULL) {
|
||||
gBS->UninstallMultipleProtocolInterfaces (
|
||||
BmmCallbackInfo->FeDriverHandle,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
&mFeHiiVendorDevicePath,
|
||||
&gEfiHiiConfigAccessProtocolGuid,
|
||||
&BmmCallbackInfo->FeConfigAccess,
|
||||
NULL
|
||||
);
|
||||
}
|
||||
|
||||
if (BmmCallbackInfo->BmmDriverHandle != NULL) {
|
||||
gBS->UninstallMultipleProtocolInterfaces (
|
||||
BmmCallbackInfo->BmmDriverHandle,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
&mBmmHiiVendorDevicePath,
|
||||
&gEfiHiiConfigAccessProtocolGuid,
|
||||
&BmmCallbackInfo->BmmConfigAccess,
|
||||
NULL
|
||||
);
|
||||
}
|
||||
|
||||
FreePool (BmmCallbackInfo->LoadContext);
|
||||
FreePool (BmmCallbackInfo);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue