From 57bcc39da2fe3ce3f52a92b40297ce9ae7cc1edf Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Wed, 3 Jan 2018 16:46:25 +0800 Subject: [PATCH] BaseTools/C/Common: Fix potential memory leak Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu Reviewed-by: Yonghong Zhu Reviewed-by: Liming Gao (cherry picked from commit 1f7e7e70d2aafbea9f56053280fbb2a7b17da8ed) --- BaseTools/Source/C/Common/PcdValueCommon.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/C/Common/PcdValueCommon.c b/BaseTools/Source/C/Common/PcdValueCommon.c index 42f76ddbbc..348f148ff9 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.
+Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.
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; } }