From 01b699a971ba90bca1ad8b608854d910eaaee5cc Mon Sep 17 00:00:00 2001 From: Shumin Qiu Date: Fri, 13 Feb 2015 01:00:47 +0000 Subject: [PATCH] NetworkPkg: Code refine to avoid NULL pointer dereferenced. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Shumin Qiu Reviewed-by: Ye Ting Reviewed-by: Fu Siyuan git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16844 6f19259b-4bc3-4df7-8a09-765794883524 --- NetworkPkg/Dhcp6Dxe/Dhcp6Io.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/NetworkPkg/Dhcp6Dxe/Dhcp6Io.c b/NetworkPkg/Dhcp6Dxe/Dhcp6Io.c index 063605e609..b4e0007926 100644 --- a/NetworkPkg/Dhcp6Dxe/Dhcp6Io.c +++ b/NetworkPkg/Dhcp6Dxe/Dhcp6Io.c @@ -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); + } } }