]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/HttpBootDxe/HttpBootDhcp6.c
UefiCpuPkg/Application/Cpuid: Remove unnecessary code check
[mirror_edk2.git] / NetworkPkg / HttpBootDxe / HttpBootDhcp6.c
index e5cf894714e1a75dd501e9c769748f297b91546b..d2960e4f6c14a15858f40d447d8a3e02eee88df7 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Functions implementation related with DHCPv6 for HTTP boot driver.\r
 \r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available under \r
 the terms and conditions of the BSD License that accompanies this distribution.  \r
 The full text of the license may be found at\r
@@ -298,7 +298,11 @@ HttpBootParseDhcp6Packet (
   //\r
   if (IsHttpOffer) {\r
     if (IpExpressedUri) {\r
-      OfferType = IsProxyOffer ? HttpOfferTypeProxyIpUri : HttpOfferTypeDhcpIpUri;\r
+      if (IsProxyOffer) {\r
+        OfferType = HttpOfferTypeProxyIpUri;\r
+      } else {\r
+        OfferType = IsDnsOffer ? HttpOfferTypeDhcpIpUriDns : HttpOfferTypeDhcpIpUri;\r
+      }\r
     } else {\r
       if (!IsProxyOffer) {\r
         OfferType = IsDnsOffer ? HttpOfferTypeDhcpNameUriDns : HttpOfferTypeDhcpNameUri;\r
@@ -974,8 +978,13 @@ ON_EXIT:
     Dhcp6->Configure (Dhcp6, NULL);\r
   } else {\r
     ZeroMem (&Config, sizeof (EFI_DHCP6_CONFIG_DATA));\r
-    ZeroMem (&Mode, sizeof (EFI_DHCP6_MODE_DATA));\r
     Dhcp6->Configure (Dhcp6, &Config);\r
+    if (Mode.ClientId != NULL) {\r
+      FreePool (Mode.ClientId);\r
+    }\r
+    if (Mode.Ia != NULL) {\r
+      FreePool (Mode.Ia);\r
+    }\r
   }\r
 \r
   return Status; \r