diff options
author | Hao Wu <hao.a.wu@intel.com> | 2017-12-18 15:59:53 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2017-12-25 09:54:48 +0800 |
commit | ae0fbb7f5ad41866bca89320f501282e173b373d (patch) | |
tree | 58908d88803948af4e02f83afc01327e6aca8dcc /BaseTools/Source/C/GenSec | |
parent | 33fc1fc46deb3b7779b92228b1c2d0aba2d16e44 (diff) | |
download | edk2-ae0fbb7f5ad41866bca89320f501282e173b373d.zip edk2-ae0fbb7f5ad41866bca89320f501282e173b373d.tar.gz edk2-ae0fbb7f5ad41866bca89320f501282e173b373d.tar.bz2 |
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/C/GenSec')
-rw-r--r-- | BaseTools/Source/C/GenSec/GenSec.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/BaseTools/Source/C/GenSec/GenSec.c b/BaseTools/Source/C/GenSec/GenSec.c index 5545f12..01d3bc4 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 ();
|