]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Udp6Dxe/Udp6Impl.c
Fix a bug about the iSCSI DHCP dependency issue.
[mirror_edk2.git] / NetworkPkg / Udp6Dxe / Udp6Impl.c
index 8e259319b9d4280ac775b290f44d801368401d7d..3830b14415e6bdb2a8fcccd6b177c32a9ccd4b53 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Udp6 driver's whole implementation.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -363,7 +363,8 @@ ON_ERROR:
   }\r
 \r
   IpIoDestroy (Udp6Service->IpIo);\r
-\r
+  Udp6Service->IpIo = NULL;\r
+  \r
   return Status;\r
 }\r
 \r
@@ -388,6 +389,9 @@ Udp6CleanService (
   // Destroy the IpIo.\r
   //\r
   IpIoDestroy (Udp6Service->IpIo);\r
+  Udp6Service->IpIo = NULL;\r
+  \r
+  ZeroMem (Udp6Service, sizeof (UDP6_SERVICE_DATA));\r
 }\r
 \r
 \r
@@ -491,7 +495,7 @@ Udp6InitInstance (
   Instance->IcmpError   = EFI_SUCCESS;\r
   Instance->Configured  = FALSE;\r
   Instance->IsNoMapping = FALSE;\r
-  Instance->Destroyed   = FALSE;\r
+  Instance->InDestroy   = FALSE;\r
 }\r
 \r
 \r