Fix a K9 error.Result of GetVariable2() function that may return NULL will be derefer...
authorWu Jiaxin <jiaxin.wu@intel.com>
Tue, 29 Oct 2013 08:52:01 +0000 (08:52 +0000)
committerjiaxinwu <jiaxinwu@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 29 Oct 2013 08:52:01 +0000 (08:52 +0000)
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com >
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Dong Guo <guo.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14814 6f19259b-4bc3-4df7-8a09-765794883524

NetworkPkg/IScsiDxe/IScsiMisc.c

index 1079c187fa22810d978200250a1a107d1f3593e9..6ed4974545fba7b35dfa17fab3ba4b5eef74c355 100644 (file)
@@ -953,9 +953,10 @@ IScsiDhcpIsConfigured (
                (VOID**)&AttemptTmp,\r
                NULL\r
                );\r
-    if(EFI_ERROR (Status)) {\r
+    if(AttemptTmp == NULL || EFI_ERROR (Status)) {\r
       continue;\r
     }\r
+    \r
     ASSERT (AttemptConfigOrder[Index] == AttemptTmp->AttemptConfigIndex);\r
 \r
     if (AttemptTmp->SessionConfigData.Enabled == ISCSI_DISABLED) {\r