From: "Zhu, Yonghong" <yonghong.zhu@intel.com>
To: "Feng, YunhuaX" <yunhuax.feng@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Gao, Liming" <liming.gao@intel.com>,
"Zhu, Yonghong" <yonghong.zhu@intel.com>
Subject: Re: [PATCH 1/3] BaseTools: Correct GenSec argument dummy free memory issue
Date: Wed, 11 Apr 2018 06:33:15 +0000 [thread overview]
Message-ID: <B9726D6DCCFB8B4CA276A9169B02216D51FDD952@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <47C64442C08CCD4089DC43B6B5E46BC484BA94@shsmsx102.ccr.corp.intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Best Regards,
Zhu Yonghong
-----Original Message-----
From: Feng, YunhuaX
Sent: Tuesday, April 10, 2018 9:10 AM
To: 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
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 prev parent reply other threads:[~2018-04-11 6:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-10 1:09 [PATCH 1/3] BaseTools: Correct GenSec argument dummy free memory issue Feng, YunhuaX
2018-04-11 6:33 ` Zhu, Yonghong [this message]
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=B9726D6DCCFB8B4CA276A9169B02216D51FDD952@SHSMSX103.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