FatPkg/FatPei/Gpt.c: Fix uninitialized variable issue

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.ni@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Chen A Chen 2019-02-01 10:21:27 +08:00 committed by Liming Gao
parent 1f7af69d10
commit aad4e2ec8f
1 changed files with 3 additions and 0 deletions

View File

@ -244,6 +244,9 @@ PartitionCheckGptEntryArray (
UINTN Index2;
EFI_PARTITION_ENTRY *Entry;
PartitionEntryBuffer = NULL;
PartitionEntryStatus = NULL;
ParentBlockDev = &(PrivateData->BlockDevice[ParentBlockDevNo]);
Found = FALSE;