Uninitialized pointer variable may randomly point to a block of memory. In This case, FreePool function will free a block of memory that is not belongs to this function.
Cc: Ruiyu Ni <ray...@intel.com> Cc: Hao Wu <hao.a...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.c...@intel.com> --- FatPkg/FatPei/Gpt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/FatPkg/FatPei/Gpt.c b/FatPkg/FatPei/Gpt.c index c3afb668d7..bba33c5bfd 100644 --- a/FatPkg/FatPei/Gpt.c +++ b/FatPkg/FatPei/Gpt.c @@ -244,6 +244,9 @@ PartitionCheckGptEntryArray ( UINTN Index2; EFI_PARTITION_ENTRY *Entry; + PartitionEntryBuffer = NULL; + PartitionEntryStatus = NULL; + ParentBlockDev = &(PrivateData->BlockDevice[ParentBlockDevNo]); Found = FALSE; -- 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel