NetworkPkg/IScsiDxe: Add check to avoid use NULL pointer

Cc: Wu Hao A <hao.a.wu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
This commit is contained in:
Jiaxin Wu 2017-10-27 10:17:08 +08:00
parent 770f9aae09
commit 0e7794d36d
1 changed files with 4 additions and 0 deletions

View File

@ -3596,6 +3596,10 @@ IScsiFormCallback (
switch (Value->u8) {
case IP_MODE_IP6:
NicInfo = IScsiGetNicInfoByIndex (Private->Current->NicIndex);
if(NicInfo == NULL) {
break;
}
if(!NicInfo->Ipv6Available) {
//
// Current NIC doesn't Support IPv6, hence use IPv4.