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);