]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Ip6Dxe/ComponentName.c
CorebootPayloadPkg: Add coreboot PlatfromBootManagerLib implementation
[mirror_edk2.git] / NetworkPkg / Ip6Dxe / ComponentName.c
index 75a1562ca07f31e2e3d1b78bf3c2f31763effde4..6a1f082edd7f6a86d1c6cd30f53dcccb17a59ee9 100644 (file)
@@ -2,7 +2,7 @@
   Implementation of EFI_COMPONENT_NAME_PROTOCOL and\r
   EFI_COMPONENT_NAME2_PROTOCOL protocol.\r
 \r
   Implementation of EFI_COMPONENT_NAME_PROTOCOL and\r
   EFI_COMPONENT_NAME2_PROTOCOL protocol.\r
 \r
-  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2016, 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
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -263,6 +263,32 @@ UpdateName (
   //\r
   Offset = 0;\r
   Status = Ip6->GetModeData (Ip6, &Ip6ModeData, NULL, NULL);\r
   //\r
   Offset = 0;\r
   Status = Ip6->GetModeData (Ip6, &Ip6ModeData, NULL, NULL);\r
+  if (!EFI_ERROR (Status)) {\r
+    if (Ip6ModeData.AddressList != NULL) {\r
+      FreePool (Ip6ModeData.AddressList);\r
+    }\r
+\r
+    if (Ip6ModeData.GroupTable != NULL) {\r
+      FreePool (Ip6ModeData.GroupTable);\r
+    }\r
+\r
+    if (Ip6ModeData.RouteTable != NULL) {\r
+      FreePool (Ip6ModeData.RouteTable);\r
+    }\r
+\r
+    if (Ip6ModeData.NeighborCache != NULL) {\r
+      FreePool (Ip6ModeData.NeighborCache);\r
+    }\r
+\r
+    if (Ip6ModeData.PrefixTable != NULL) {\r
+      FreePool (Ip6ModeData.PrefixTable);\r
+    }\r
+\r
+    if (Ip6ModeData.IcmpTypeList != NULL) {\r
+      FreePool (Ip6ModeData.IcmpTypeList);\r
+    }\r
+  }\r
+\r
   if (!EFI_ERROR (Status) && Ip6ModeData.IsStarted) {\r
     Status = NetLibIp6ToStr (&Ip6ModeData.ConfigData.StationAddress, Address, sizeof(Address));\r
     if (EFI_ERROR (Status)) {\r
   if (!EFI_ERROR (Status) && Ip6ModeData.IsStarted) {\r
     Status = NetLibIp6ToStr (&Ip6ModeData.ConfigData.StationAddress, Address, sizeof(Address));\r
     if (EFI_ERROR (Status)) {\r