diff options
author | Hao Wu <hao.a.wu@intel.com> | 2018-01-03 16:46:25 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2018-01-15 10:42:17 +0800 |
commit | 1f7e7e70d2aafbea9f56053280fbb2a7b17da8ed (patch) | |
tree | ba74b1e9a7670a0126e7869f16fc1070dc6702ba | |
parent | 3710ec21d59cd1764a4075af419e70332d7f0a3c (diff) | |
download | edk2-1f7e7e70d2aafbea9f56053280fbb2a7b17da8ed.zip edk2-1f7e7e70d2aafbea9f56053280fbb2a7b17da8ed.tar.gz edk2-1f7e7e70d2aafbea9f56053280fbb2a7b17da8ed.tar.bz2 |
BaseTools/C/Common: Fix potential memory leak
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
-rw-r--r-- | BaseTools/Source/C/Common/PcdValueCommon.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/BaseTools/Source/C/Common/PcdValueCommon.c b/BaseTools/Source/C/Common/PcdValueCommon.c index 42f76dd..348f148 100644 --- a/BaseTools/Source/C/Common/PcdValueCommon.c +++ b/BaseTools/Source/C/Common/PcdValueCommon.c @@ -1,7 +1,7 @@ /** @file
This file contains the PcdValue structure definition.
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -106,6 +106,9 @@ Returns: case 5:
PcdList[PcdIndex].Value = Token;
break;
+ default:
+ free (Token);
+ break;
}
}
|