* [PATCH] BaseTools: Correct GenSec argument dummy free memory issue
@ 2018-03-27 1:46 Feng, YunhuaX
0 siblings, 0 replies; only message in thread
From: Feng, YunhuaX @ 2018-03-27 1:46 UTC (permalink / raw)
To: edk2-devel@lists.01.org; +Cc: Zhu, Yonghong, Gao, Liming
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>
---
BaseTools/Source/C/GenSec/GenSec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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,9 +1,9 @@
/** @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
http://opensource.org/licenses/bsd-license.php
@@ -1374,10 +1374,11 @@ Returns:
if (SectGuidHeaderLength == 0) {
SectGuidAttribute |= EFI_GUIDED_SECTION_PROCESSING_REQUIRED;
}
if (DummyFileBuffer != NULL) {
free (DummyFileBuffer);
+ DummyFileBuffer = NULL;
}
if (InFileBuffer != NULL) {
free (InFileBuffer);
}
}
--
2.12.2.windows.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-03-27 1:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-27 1:46 [PATCH] BaseTools: Correct GenSec argument dummy free memory issue Feng, YunhuaX
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox