]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess.c
NetworkPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / NetworkPkg / WifiConnectionManagerDxe / WifiConnectionMgrHiiConfigAccess.c
index bfb6b6e5caa8dcb52255cb905cc0671a2dadd7c8..881592efd977bdd0ccc163f27646cc4e7904814b 100644 (file)
@@ -3,13 +3,7 @@
 \r
   Copyright (c) 2019, 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
@@ -447,6 +441,8 @@ WifiMgrRefreshNetworkList (
       }\r
       FreePool (AKMListDisplay);\r
       FreePool (CipherListDisplay);\r
+      AKMListDisplay    = NULL;\r
+      CipherListDisplay = NULL;\r
 \r
       HiiCreateGotoOpCode (\r
         StartOpCodeHandle,\r
@@ -532,6 +528,8 @@ WifiMgrRefreshNetworkList (
       }\r
       FreePool (AKMListDisplay);\r
       FreePool (CipherListDisplay);\r
+      AKMListDisplay    = NULL;\r
+      CipherListDisplay = NULL;\r
 \r
       HiiCreateGotoOpCode (\r
         StartOpCodeHandle,\r
@@ -612,6 +610,8 @@ WifiMgrRefreshNetworkList (
       }\r
       FreePool (AKMListDisplay);\r
       FreePool (CipherListDisplay);\r
+      AKMListDisplay    = NULL;\r
+      CipherListDisplay = NULL;\r
 \r
       PortHelpToken = HiiSetString (Private->RegisteredHandle, 0, PortString, NULL);\r
 \r
@@ -1657,6 +1657,7 @@ WifiMgrDxeHiiConfigAccessCallback (
 \r
           ZeroMem (Profile->PrivateKeyData, Profile->PrivateKeyDataSize);\r
           FreePool (Profile->PrivateKeyData);\r
+          Profile->PrivateKeyData = NULL;\r
         }\r
 \r
         Status = WifiMgrReadFileToBuffer (\r
@@ -1700,12 +1701,14 @@ WifiMgrDxeHiiConfigAccessCallback (
 \r
             ZeroMem (Profile->CACertData, Profile->CACertSize);\r
             FreePool (Profile->CACertData);\r
+            Profile->CACertData = NULL;\r
           }\r
         } else if (Private->FileType == FileTypeClientCert) {\r
           if (Profile->ClientCertData != NULL) {\r
 \r
             ZeroMem (Profile->ClientCertData, Profile->ClientCertSize);\r
             FreePool (Profile->ClientCertData);\r
+            Profile->ClientCertData = NULL;\r
           }\r
         } else {\r
           break;\r