This patch is used to fix suspicious dereference of pointer before
NULL check in IScsiDxe driver.
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19552
6f19259b-4bc3-4df7-8a09-
765794883524
//\r
// Check any AIP instances exist in system.\r
//\r
- AipHandleCount = 0;\r
+ AipHandleCount = 0;\r
+ AipHandleBuffer = NULL;\r
Status = gBS->LocateHandleBuffer (\r
ByProtocol,\r
&gEfiAdapterInformationProtocolGuid,\r
return EFI_NOT_FOUND;\r
}\r
\r
+ ASSERT (AipHandleBuffer != NULL);\r
+\r
InfoBlock = NULL;\r
\r
for (AipIndex = 0; AipIndex < AipHandleCount; AipIndex++) {\r