From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: dandan.bi@intel.com) Received: from mga05.intel.com (mga05.intel.com []) by groups.io with SMTP; Tue, 23 Apr 2019 00:00:57 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Apr 2019 00:00:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,384,1549958400"; d="scan'208";a="225843178" Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.147]) by orsmga001.jf.intel.com with ESMTP; 23 Apr 2019 00:00:56 -0700 From: "Dandan Bi" To: devel@edk2.groups.io Cc: Liming Gao , Eric Dong , Hao Wu , Ruiyu Ni Subject: [patch 2/2] MdeModulePkg/FileExplorer: Set Handle to NULL after uninstall protocol Date: Tue, 23 Apr 2019 15:00:39 +0800 Message-Id: <20190423070039.29160-3-dandan.bi@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 In-Reply-To: <20190423070039.29160-1-dandan.bi@intel.com> References: <20190423070039.29160-1-dandan.bi@intel.com> 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 Cc: Eric Dong Cc: Hao Wu Cc: Ruiyu Ni Signed-off-by: Dandan Bi --- MdeModulePkg/Library/FileExplorerLib/FileExplorer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c index 27f12fcbf9..58e4910259 100644 --- a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c +++ b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c @@ -1,9 +1,9 @@ /** @file File explorer related functions. -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 **/ @@ -1641,10 +1641,11 @@ FileExplorerLibDestructor ( NULL ); ASSERT_EFI_ERROR (Status); HiiRemovePackages (gFileExplorerPrivate.FeHiiHandle); + gFileExplorerPrivate.FeDriverHandle = NULL; } FreePool (gHiiVendorDevicePath); return EFI_SUCCESS; -- 2.18.0.windows.1