From 533020ef8061171713edfcb1e28eac63876c9937 Mon Sep 17 00:00:00 2001 From: eric_tian Date: Thu, 19 Mar 2009 03:13:08 +0000 Subject: [PATCH] close notify event to avoid variable architectural protocol to be installed twice or more. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7904 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c index 7a69a223c4..fdaad2017e 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c @@ -2087,6 +2087,12 @@ FvbNotificationEvent ( FreePool (HandleBuffer); if (!EFI_ERROR (Status) && Fvb != NULL) { + // + // Close the notify event to avoid install gEfiVariableArchProtocolGuid & gEfiVariableWriteArchProtocolGuid again. + // + Status = gBS->CloseEvent (Event); + ASSERT_EFI_ERROR (Status); + Status = VariableCommonInitialize (Fvb); ASSERT_EFI_ERROR (Status);