MdeModulePkg/CapsuleApp: Fix potential NULL pointer dereference issue

To avoid potential NULL pointer dereference issue. Initialize them at
the beginning of the function.

Cc: Jian J Wang <jian.j.wang@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:06:49 +08:00
committed by Liming Gao
parent aad4e2ec8f
commit e98212cb5d
3 changed files with 29 additions and 10 deletions

View File

@@ -916,8 +916,9 @@ UefiMain (
EFI_GUID ImageTypeId;
UINTN ImageIndex;
MapFsStr = NULL;
CapsuleNum = 0;
BlockDescriptors = NULL;
MapFsStr = NULL;
CapsuleNum = 0;
Status = GetArg();
if (EFI_ERROR(Status)) {