]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/BMMUiLib: Set Handle to NULL after uninstall protocol
authorDandan Bi <dandan.bi@intel.com>
Tue, 23 Apr 2019 06:19:44 +0000 (14:19 +0800)
committerLiming Gao <liming.gao@intel.com>
Sun, 28 Apr 2019 01:32:41 +0000 (09:32 +0800)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1728

Currently Emulator meets ASSERT when enter setup->Continue->enter setup.
When re-enter setup, the BmmDriverHandle in BMMUiLib Constructor
is not NULL which cause InstallMultipleProtocolInterfaces failure,
then ASSERT. So here set BmmDriverHandle to NULL after uninstalling
protocols on it in Destructor function to avoid this issue.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c

index 2167d3a5e8344b2d4f7bfada946c2523af143d2e..28592f9f47bd429ecb4736e9a3df8c5559593266 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 The functions for Boot Maintainence Main menu.\r
 \r
-Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>\r
 SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
@@ -1763,6 +1763,7 @@ BootMaintenanceManagerUiLibDestructor (
          );\r
 \r
   FreePool (mBmmCallbackInfo->LoadContext);\r
+  mBmmCallbackInfo->BmmDriverHandle = NULL;\r
 \r
   return EFI_SUCCESS;\r
 }\r