mirror of https://github.com/acidanthera/audk.git
NetworkPkg: Fix suspicious dereference of pointer before NULL check
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
This commit is contained in:
parent
1254d3a989
commit
5346adbb18
|
@ -105,7 +105,8 @@ IScsiCheckAip (
|
||||||
//
|
//
|
||||||
// Check any AIP instances exist in system.
|
// Check any AIP instances exist in system.
|
||||||
//
|
//
|
||||||
AipHandleCount = 0;
|
AipHandleCount = 0;
|
||||||
|
AipHandleBuffer = NULL;
|
||||||
Status = gBS->LocateHandleBuffer (
|
Status = gBS->LocateHandleBuffer (
|
||||||
ByProtocol,
|
ByProtocol,
|
||||||
&gEfiAdapterInformationProtocolGuid,
|
&gEfiAdapterInformationProtocolGuid,
|
||||||
|
@ -117,6 +118,8 @@ IScsiCheckAip (
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ASSERT (AipHandleBuffer != NULL);
|
||||||
|
|
||||||
InfoBlock = NULL;
|
InfoBlock = NULL;
|
||||||
|
|
||||||
for (AipIndex = 0; AipIndex < AipHandleCount; AipIndex++) {
|
for (AipIndex = 0; AipIndex < AipHandleCount; AipIndex++) {
|
||||||
|
|
Loading…
Reference in New Issue