From: "Feng, YunhuaX" <yunhuax.feng@intel.com>
To: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Zhu, Yonghong" <yonghong.zhu@intel.com>,
"Gao, Liming" <liming.gao@intel.com>
Subject: [PATCH 1/3] BaseTools: Correct GenSec argument dummy free memory issue
Date: Tue, 10 Apr 2018 01:09:45 +0000 [thread overview]
Message-ID: <47C64442C08CCD4089DC43B6B5E46BC484BA94@shsmsx102.ccr.corp.intel.com> (raw)
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
next reply other threads:[~2018-04-10 1:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-10 1:09 Feng, YunhuaX [this message]
2018-04-11 6:33 ` [PATCH 1/3] BaseTools: Correct GenSec argument dummy free memory issue Zhu, Yonghong
2018-04-11 7:57 ` Laszlo Ersek
2018-04-11 9:02 ` Laszlo Ersek
2018-04-11 14:27 ` Carsey, Jaben
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47C64442C08CCD4089DC43B6B5E46BC484BA94@shsmsx102.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox