summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2017-12-18 15:59:53 +0800
committerHao Wu <hao.a.wu@intel.com>2017-12-25 09:54:48 +0800
commitae0fbb7f5ad41866bca89320f501282e173b373d (patch)
tree58908d88803948af4e02f83afc01327e6aca8dcc /BaseTools/Source
parent33fc1fc46deb3b7779b92228b1c2d0aba2d16e44 (diff)
downloadedk2-ae0fbb7f5ad41866bca89320f501282e173b373d.tar.gz
edk2-ae0fbb7f5ad41866bca89320f501282e173b373d.tar.bz2
edk2-ae0fbb7f5ad41866bca89320f501282e173b373d.zip
BaseTools/GenSec: Fix potential memory leak
Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source')
-rw-r--r--BaseTools/Source/C/GenSec/GenSec.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/BaseTools/Source/C/GenSec/GenSec.c b/BaseTools/Source/C/GenSec/GenSec.c
index 5545f12b74..01d3bc4448 100644
--- a/BaseTools/Source/C/GenSec/GenSec.c
+++ b/BaseTools/Source/C/GenSec/GenSec.c
@@ -1670,7 +1670,11 @@ Finish:
if (OutFile != NULL) {
fclose (OutFile);
}
-
+
+ if (DummyFileBuffer != NULL) {
+ free (DummyFileBuffer);
+ }
+
VerboseMsg ("%s tool done with return code is 0x%x.", UTILITY_NAME, GetUtilityStatus ());
return GetUtilityStatus ();