From 00d2aef80c9ac866681a737ee0af60e9edccba11 Mon Sep 17 00:00:00 2001 From: Dandan Bi Date: Tue, 23 Apr 2019 14:19:44 +0800 Subject: [PATCH] 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 Cc: Eric Dong Cc: Hao Wu Cc: Ruiyu Ni Signed-off-by: Dandan Bi Reviewed-by: Eric Dong --- .../Library/BootMaintenanceManagerUiLib/BootMaintenance.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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.
+Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -1763,6 +1763,7 @@ BootMaintenanceManagerUiLibDestructor ( ); FreePool (mBmmCallbackInfo->LoadContext); + mBmmCallbackInfo->BmmDriverHandle = NULL; return EFI_SUCCESS; } -- 2.39.2