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>
This commit is contained in:
Dandan Bi 2019-04-23 14:19:44 +08:00 committed by Liming Gao
parent c9b3fe1586
commit 00d2aef80c
1 changed files with 2 additions and 1 deletions

View File

@ -1,7 +1,7 @@
/** @file /** @file
The functions for Boot Maintainence Main menu. 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 SPDX-License-Identifier: BSD-2-Clause-Patent
**/ **/
@ -1763,6 +1763,7 @@ BootMaintenanceManagerUiLibDestructor (
); );
FreePool (mBmmCallbackInfo->LoadContext); FreePool (mBmmCallbackInfo->LoadContext);
mBmmCallbackInfo->BmmDriverHandle = NULL;
return EFI_SUCCESS; return EFI_SUCCESS;
} }