mirror of https://github.com/acidanthera/audk.git
ArmPkg/PlatformBootManagerLib: fix bug in ESRT invocation
The ESRT hook call that I just added invokes the protocol before retrieving a pointer to it, which interestingly enough did not result in any crashes, nor did it get picked up by GCC. Clang did notice, though, so let's fix it right away. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
This commit is contained in:
parent
bbf79aa264
commit
aed68ed6be
|
@ -458,17 +458,13 @@ PlatformBootManagerBeforeConsole (
|
|||
Status = ProcessCapsules ();
|
||||
DEBUG ((DEBUG_INFO, "ProcessCapsules returned %r\n", Status));
|
||||
} else {
|
||||
if (EsrtManagement != NULL) {
|
||||
Status = gBS->LocateProtocol (&gEsrtManagementProtocolGuid, NULL,
|
||||
(VOID **)&EsrtManagement);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
EsrtManagement->SyncEsrtFmp ();
|
||||
}
|
||||
}
|
||||
|
||||
Status = gBS->LocateProtocol (&gEsrtManagementProtocolGuid, NULL,
|
||||
(VOID **)&EsrtManagement);
|
||||
if (EFI_ERROR (Status)) {
|
||||
EsrtManagement = NULL;
|
||||
}
|
||||
|
||||
//
|
||||
// Signal EndOfDxe PI Event
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue