NetworkPkg: Code refine to avoid NULL pointer dereferenced.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Shumin Qiu <shumin.qiu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16844 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Shumin Qiu 2015-02-13 01:00:47 +00:00 committed by shenshushi
parent 6ca9135a65
commit 01b699a971
1 changed files with 4 additions and 1 deletions

View File

@ -2900,7 +2900,10 @@ ON_CONTINUE:
0
);
if (EFI_ERROR (Status)) {
Dhcp6CleanupRetry (Instance, DHCP6_PACKET_ALL);
NET_LIST_FOR_EACH_SAFE (Entry1, Next1, &Service->Child) {
Instance = NET_LIST_USER_STRUCT (Entry1, DHCP6_INSTANCE, Link);
Dhcp6CleanupRetry (Instance, DHCP6_PACKET_ALL);
}
}
}