summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/C/GenSec
diff options
context:
space:
mode:
authorFeng, YunhuaX </o=Intel/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=Feng, YunhuaX4e1>2018-04-10 09:09:45 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-04-11 14:36:26 +0800
commit6ecab5ad077ea34467ff29ea1f5b77fa5c1e3447 (patch)
tree9aeea41492d07dd383e584a6619768a9f219ab9c /BaseTools/Source/C/GenSec
parent8b0e67821bd66af70433ee4bb858325f3033609a (diff)
downloadedk2-6ecab5ad077ea34467ff29ea1f5b77fa5c1e3447.tar.gz
edk2-6ecab5ad077ea34467ff29ea1f5b77fa5c1e3447.tar.bz2
edk2-6ecab5ad077ea34467ff29ea1f5b77fa5c1e3447.zip
BaseTools: Correct GenSec argument dummy free memory issue
Free DummyFileBuffer and set DummyFileBuffer to NULL. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/C/GenSec')
-rw-r--r--BaseTools/Source/C/GenSec/GenSec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/BaseTools/Source/C/GenSec/GenSec.c b/BaseTools/Source/C/GenSec/GenSec.c
index fb5bc5e992..56767d5a9b 100644
--- a/BaseTools/Source/C/GenSec/GenSec.c
+++ b/BaseTools/Source/C/GenSec/GenSec.c
@@ -1,7 +1,7 @@
/** @file
Creates output file that is a properly formed section per the PI spec.
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 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
which accompanies this distribution. The full text of the license may be found at
@@ -1376,6 +1376,7 @@ Returns:
}
if (DummyFileBuffer != NULL) {
free (DummyFileBuffer);
+ DummyFileBuffer = NULL;
}
if (InFileBuffer != NULL) {
free (InFileBuffer);