]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/IpSecDxe/IkeService.c
MdeModulePkg/StatusCodeHandlerRuntimeDxe: make global variable static
[mirror_edk2.git] / NetworkPkg / IpSecDxe / IkeService.c
index 6594963f5dfba2c731c29954bce3c9234ea4c16a..c5ca86b5b0184be3f2f0a20d9056d99bb1c3bc93 100644 (file)
@@ -1,21 +1,14 @@
 /** @file\r
   Provide IPsec Key Exchange (IKE) service general interfaces.\r
 \r
-  Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2018, 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
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php.\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
 #include "IkeService.h"\r
 #include "IpSecConfigImpl.h"\r
-#include "Ikev2/Utility.h"\r
 \r
 IKE_EXCHANGE_INTERFACE  *mIkeExchange[] = {\r
   &mIkev1Exchange,\r
@@ -274,7 +267,7 @@ IkeOpenOutputUdp (
                        &BufSize,\r
                        IfInfo\r
                        );\r
-    \r
+\r
     if (EFI_ERROR (Status)) {\r
       goto ON_EXIT;\r
     }\r
@@ -329,6 +322,31 @@ IkeOpenOutputUdp (
       UdpIoFreeIo (UdpService->Output);\r
       goto ON_EXIT;\r
     }\r
+\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
     // Reconfigure udp6 io without remote address.\r
     //\r