summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-08 09:20:51 +0000
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-08 09:20:51 +0000
commit4376a6f27300b7f710947ccf5df53f45a556d970 (patch)
treecec4a697df7edfed97ef9ef475ae75183acef1f9
parent299b4cf31258740b4a5eb2c970605afdf9c76c63 (diff)
downloadedk2-platforms-4376a6f27300b7f710947ccf5df53f45a556d970.tar.xz
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
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c37
1 files changed, 30 insertions, 7 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c
index f5e0bf04a0..98aadd6ce1 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c
@@ -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;
}