diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c index 18f835a9a9..4225e80f42 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c @@ -1667,6 +1667,8 @@ BmGetFileBufferFromLoadFileFileSystem ( Handles = NULL; HandleCount = 0; } + + Handle = NULL; for (Index = 0; Index < HandleCount; Index++) { Node = DevicePathFromHandle (Handles[Index]); Status = gBS->LocateDevicePath (&gEfiLoadFileProtocolGuid, &Node, &Handle);