]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/Common/PcdValueCommon.c
BaseTools/C/Common: Fix potential memory leak
[mirror_edk2.git] / BaseTools / Source / C / Common / PcdValueCommon.c
index 42f76ddbbccedfae23c3581cea8f591575f24678..348f148ff90e72b8d50911a0770d9a3c1f8c4139 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 This file contains the PcdValue structure definition.\r
 \r
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2017 - 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
@@ -106,6 +106,9 @@ Returns:
   case 5:\r
     PcdList[PcdIndex].Value = Token;\r
     break;\r
+  default:\r
+    free (Token);\r
+    break;\r
   }\r
 }\r
 \r