]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix the bug that Boot Mainteinance Manager in the front page can not be entered twice...
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 8 Apr 2009 09:20:51 +0000 (09:20 +0000)
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 8 Apr 2009 09:20:51 +0000 (09:20 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8040 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c

index f5e0bf04a026a6d8ebd578f88f4c369a2b4510ba..98aadd6ce187cd1f3ebe407089381c084c866c04 100644 (file)
@@ -910,7 +910,7 @@ InitializeBM (
                   NULL\r
                   );\r
   if (EFI_ERROR (Status)) {\r
-    return Status;\r
+    goto Exit;\r
   }\r
 \r
   //\r
@@ -925,7 +925,7 @@ InitializeBM (
                   NULL\r
                   );\r
   if (EFI_ERROR (Status)) {\r
-    return Status;\r
+    goto Exit;\r
   }\r
 \r
   //\r
@@ -962,9 +962,8 @@ InitializeBM (
   gUpdateData.BufferSize = UPDATE_DATA_SIZE;\r
   gUpdateData.Data = AllocateZeroPool (UPDATE_DATA_SIZE);\r
   if (gUpdateData.Data == NULL) {\r
-    FreePool (BmmCallbackInfo->LoadContext);\r
-    FreePool (BmmCallbackInfo);\r
-    return EFI_OUT_OF_RESOURCES;\r
+    Status = EFI_OUT_OF_RESOURCES;\r
+    goto Exit;\r
   }\r
 \r
   InitializeStringDepository ();\r
@@ -1065,11 +1064,35 @@ InitializeBM (
 \r
   FreeAllMenu ();\r
 \r
-  FreePool (BmmCallbackInfo->LoadContext);\r
-  FreePool (BmmCallbackInfo);\r
   FreePool (gUpdateData.Data);\r
   gUpdateData.Data = NULL;\r
 \r
+Exit:\r
+  if (BmmCallbackInfo->FeDriverHandle != NULL) {\r
+    gBS->UninstallMultipleProtocolInterfaces (\r
+           BmmCallbackInfo->FeDriverHandle,\r
+           &gEfiDevicePathProtocolGuid,\r
+           &mFeHiiVendorDevicePath,\r
+           &gEfiHiiConfigAccessProtocolGuid,\r
+           &BmmCallbackInfo->FeConfigAccess,\r
+           NULL\r
+           );\r
+  }\r
+\r
+  if (BmmCallbackInfo->BmmDriverHandle != NULL) {\r
+    gBS->UninstallMultipleProtocolInterfaces (\r
+           BmmCallbackInfo->BmmDriverHandle,\r
+           &gEfiDevicePathProtocolGuid,\r
+           &mBmmHiiVendorDevicePath,\r
+           &gEfiHiiConfigAccessProtocolGuid,\r
+           &BmmCallbackInfo->BmmConfigAccess,\r
+           NULL\r
+           );\r
+  }\r
+\r
+  FreePool (BmmCallbackInfo->LoadContext);\r
+  FreePool (BmmCallbackInfo);\r
+\r
   return Status;\r
 }\r
 \r