MdeModulePkg/FileExplorer: 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 FeDriverHandle in FileExplorerLib Constructor
is not NULL which cause InstallMultipleProtocolInterfaces failure,
then ASSERT. So here set FeDriverHandle to NULL after uninstalling
protocols on it in the 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:23:15 +08:00 committed by Liming Gao
parent 00d2aef80c
commit 5a4f3a3453
1 changed files with 2 additions and 1 deletions

View File

@ -1,7 +1,7 @@
/** @file
File explorer related functions.
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
**/
@ -1643,6 +1643,7 @@ FileExplorerLibDestructor (
ASSERT_EFI_ERROR (Status);
HiiRemovePackages (gFileExplorerPrivate.FeHiiHandle);
gFileExplorerPrivate.FeDriverHandle = NULL;
}
FreePool (gHiiVendorDevicePath);