Skip to content

Commit

Permalink
Fix unitialized variable found in clang compiler experiments (microso…
Browse files Browse the repository at this point in the history
…ft#108)

Fix a uninitialized variable usage case found when experimenting with
new clang compiler configuration. If the first `goto exit` statement is
used then a comparison will be done against the uninitialized value of
the variable
  • Loading branch information
cfernald committed Dec 9, 2022
1 parent ca21da4 commit 9be9753
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions MsCorePkg/AcpiRGRT/AcpiRgrt.c
Expand Up @@ -52,6 +52,8 @@ InstallAcpiTable (
UINT32 RgrtTableSize;
UINT64 OemTableId;

RgrtAcpiTable = NULL;

Status = gBS->LocateProtocol (&gEfiAcpiTableProtocolGuid, NULL, (VOID **)&AcpiTable);
if (EFI_ERROR (Status)) {
// we are expected to be called at least once before ACPI is installed
Expand Down

0 comments on commit 9be9753

Please sign in to comment.