diff --git a/BootloaderCorePkg/Stage2/Stage2.c b/BootloaderCorePkg/Stage2/Stage2.c index 38ac682a..e3bf446e 100644 --- a/BootloaderCorePkg/Stage2/Stage2.c +++ b/BootloaderCorePkg/Stage2/Stage2.c @@ -158,6 +158,8 @@ NormalBootPath ( AddMeasurePoint (0x31A0); PldBase = 0; + PldEntry = NULL; + Status = EFI_SUCCESS; if (Dst[0] == 0x00005A4D) { // It is a PE format @@ -173,7 +175,6 @@ NormalBootPath ( } else if (IsElfImage (Dst)) { Status = LoadElfImage (Dst, (VOID *)&PldEntry); } else { - PldEntry = NULL; if (FeaturePcdGet (PcdLinuxPayloadEnabled)) { if (IsBzImage (Dst)) { // It is a Linux kernel image