From: Wu Jiaxin Date: Tue, 29 Oct 2013 08:52:01 +0000 (+0000) Subject: Fix a K9 error.Result of GetVariable2() function that may return NULL will be derefer... X-Git-Tag: edk2-stable201903~12143 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=107e3d7a37035ec386941ad8fafcd9e7d4b0fabe;p=mirror_edk2.git Fix a K9 error.Result of GetVariable2() function that may return NULL will be dereferenced. Signed-off-by: Wu Jiaxin Reviewed-by: Fu Siyuan Reviewed-by: Dong Guo git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14814 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c b/NetworkPkg/IScsiDxe/IScsiMisc.c index 1079c187fa..6ed4974545 100644 --- a/NetworkPkg/IScsiDxe/IScsiMisc.c +++ b/NetworkPkg/IScsiDxe/IScsiMisc.c @@ -953,9 +953,10 @@ IScsiDhcpIsConfigured ( (VOID**)&AttemptTmp, NULL ); - if(EFI_ERROR (Status)) { + if(AttemptTmp == NULL || EFI_ERROR (Status)) { continue; } + ASSERT (AttemptConfigOrder[Index] == AttemptTmp->AttemptConfigIndex); if (AttemptTmp->SessionConfigData.Enabled == ISCSI_DISABLED) {