]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c
1. Fix a bug in PXE driver that the PXE boot do not restart if a new boot option...
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Dhcp4Dxe / Dhcp4Io.c
index 65ab5ac702eea104f727901698726d20e959d689..19ad101d5404d812998568727fdbb7175f43e72c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   EFI DHCP protocol implementation.\r
   \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -972,11 +972,11 @@ DhcpInput (
   DhcpSb  = (DHCP_SERVICE *) Context;\r
 \r
   //\r
-  // Don't restart receive if error occurs or DHCP is destoried.\r
+  // Don't restart receive if error occurs or DHCP is destroyed.\r
   //\r
   if (EFI_ERROR (IoStatus)) {\r
     return ;\r
-  } else if (DhcpSb->ServiceState == DHCP_DESTORY) {\r
+  } else if (DhcpSb->ServiceState == DHCP_DESTROY) {\r
     NetbufFree (UdpPacket);\r
     return ;\r
   }\r
@@ -1621,7 +1621,9 @@ DhcpOnTimerTick (
         goto END_SESSION;\r
       }\r
 \r
-      Instance->ElaspedTime= 0;\r
+      if (Instance != NULL) {\r
+        Instance->ElaspedTime= 0;\r
+      }      \r
       \r
       Status = DhcpSendMessage (\r
                  DhcpSb,\r
@@ -1643,7 +1645,9 @@ DhcpOnTimerTick (
         goto END_SESSION;\r
       }\r
 \r
-      Instance->ElaspedTime= 0;\r
+      if (Instance != NULL) {\r
+        Instance->ElaspedTime= 0;\r
+      }    \r
 \r
       Status = DhcpSendMessage (\r
                  DhcpSb,\r