summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2019-04-23 14:19:44 +0800
committerLiming Gao <liming.gao@intel.com>2019-04-28 09:32:41 +0800
commit00d2aef80c9ac866681a737ee0af60e9edccba11 (patch)
treec3cbcccbe068f55d012f3d9de9d5b1af9a08d2f0
parentc9b3fe1586eb191150081851c94f30277b7a3844 (diff)
downloadedk2-00d2aef80c9ac866681a737ee0af60e9edccba11.tar.gz
edk2-00d2aef80c9ac866681a737ee0af60e9edccba11.tar.bz2
edk2-00d2aef80c9ac866681a737ee0af60e9edccba11.zip
MdeModulePkg/BMMUiLib: Set Handle to NULL after uninstall protocol
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>
-rw-r--r--MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c
index 2167d3a5e8..28592f9f47 100644
--- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c
+++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c
@@ -1,7 +1,7 @@
/** @file
The functions for Boot Maintainence Main menu.
-Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -1763,6 +1763,7 @@ BootMaintenanceManagerUiLibDestructor (
);
FreePool (mBmmCallbackInfo->LoadContext);
+ mBmmCallbackInfo->BmmDriverHandle = NULL;
return EFI_SUCCESS;
}