Reviewed-by: Eric Dong <[email protected]>

> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of
> Dandan Bi
> Sent: Tuesday, April 23, 2019 3:01 PM
> To: [email protected]
> Cc: Gao, Liming <[email protected]>; Dong, Eric <[email protected]>;
> Wu, Hao A <[email protected]>; Ni, Ray <[email protected]>
> Subject: [edk2-devel] [patch 1/2] 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 <[email protected]>
> Cc: Eric Dong <[email protected]>
> Cc: Hao Wu <[email protected]>
> Cc: Ruiyu Ni <[email protected]>
> Signed-off-by: Dandan Bi <[email protected]>
> ---
>  .../Library/BootMaintenanceManagerUiLib/BootMaintenance.c      | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git
> a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc
> e.c
> b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc
> e.c
> index 2167d3a5e8..28592f9f47 100644
> ---
> a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc
> e.c
> +++
> b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc
> e.c
> @@ -1,9 +1,9 @@
>  /** @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
> 
>  **/
> 
>  #include "BootMaintenanceManager.h"
> @@ -1761,9 +1761,10 @@ BootMaintenanceManagerUiLibDestructor (
>           &mBmmCallbackInfo->BmmConfigAccess,
>           NULL
>           );
> 
>    FreePool (mBmmCallbackInfo->LoadContext);
> +  mBmmCallbackInfo->BmmDriverHandle = NULL;
> 
>    return EFI_SUCCESS;
>  }
> 
> --
> 2.18.0.windows.1
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#39532): https://edk2.groups.io/g/devel/message/39532
Mute This Topic: https://groups.io/mt/31306510/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to