public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/3] BaseTools: Correct GenSec argument dummy free memory issue
@ 2018-04-10  1:09 Feng, YunhuaX
  2018-04-11  6:33 ` Zhu, Yonghong
  2018-04-11  7:57 ` Laszlo Ersek
  0 siblings, 2 replies; 5+ messages in thread
From: Feng, YunhuaX @ 2018-04-10  1:09 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] 5+ messages in thread

* Re: [PATCH 1/3] BaseTools: Correct GenSec argument dummy free memory issue
  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
  2018-04-11  7:57 ` Laszlo Ersek
  1 sibling, 0 replies; 5+ messages in thread
From: Zhu, Yonghong @ 2018-04-11  6:33 UTC (permalink / raw)
  To: Feng, YunhuaX, edk2-devel@lists.01.org; +Cc: Gao, Liming, Zhu, Yonghong

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



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] BaseTools: Correct GenSec argument dummy free memory issue
  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
@ 2018-04-11  7:57 ` Laszlo Ersek
  2018-04-11  9:02   ` Laszlo Ersek
  1 sibling, 1 reply; 5+ messages in thread
From: Laszlo Ersek @ 2018-04-11  7:57 UTC (permalink / raw)
  To: Feng, YunhuaX, edk2-devel@lists.01.org; +Cc: Gao, Liming

Hello Yunhua,

On 04/10/18 03:09, Feng, YunhuaX wrote:
> 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(-)

can you please post patch sets with a cover letter, and with shallow
threading enabled?

The following three commands [1] should configure shallow threading
permanently:

git config format.coverletter     true
git config sendemail.chainreplyto false
git config sendemail.thread       true

Thank you,
Laszlo

[1]
https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt-git-guide-for-edk2-contributors-and-maintainers#contrib-05


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] BaseTools: Correct GenSec argument dummy free memory issue
  2018-04-11  7:57 ` Laszlo Ersek
@ 2018-04-11  9:02   ` Laszlo Ersek
  2018-04-11 14:27     ` Carsey, Jaben
  0 siblings, 1 reply; 5+ messages in thread
From: Laszlo Ersek @ 2018-04-11  9:02 UTC (permalink / raw)
  To: Feng, YunhuaX, edk2-devel@lists.01.org; +Cc: Gao, Liming

On 04/11/18 09:57, Laszlo Ersek wrote:
> Hello Yunhua,
> 
> On 04/10/18 03:09, Feng, YunhuaX wrote:
>> 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(-)
> 
> can you please post patch sets with a cover letter, and with shallow
> threading enabled?
> 
> The following three commands [1] should configure shallow threading
> permanently:
> 
> git config format.coverletter     true
> git config sendemail.chainreplyto false
> git config sendemail.thread       true

A related request: please run the following two commands:

git config user.name  'Yunhua Feng'
git config user.email yunhuax.feng@intel.com

The reason I'm asking for this is that your authorship information is
currently recorded in git like this (please see commit 6ecab5ad077e):

Author: Feng, YunhuaX </o=Intel/ou=Exchange Administrative Group
(FYDIBOHF23SPDLT)/cn=Recipients/cn=Feng, YunhuaX4e1>

That "thing" in the <> brackets is not an email address.

I suggest that your authorship information (which is used for new
commits you create) be identical to the name and email address that you
use in your Signed-off-by line. The above two git-config commands will
do that.

Thanks!
Laszlo


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] BaseTools: Correct GenSec argument dummy free memory issue
  2018-04-11  9:02   ` Laszlo Ersek
@ 2018-04-11 14:27     ` Carsey, Jaben
  0 siblings, 0 replies; 5+ messages in thread
From: Carsey, Jaben @ 2018-04-11 14:27 UTC (permalink / raw)
  To: Laszlo Ersek, Feng, YunhuaX, edk2-devel@lists.01.org; +Cc: Gao, Liming

I have been wondering about that <> thing myself.  Thanks!

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Laszlo Ersek
> Sent: Wednesday, April 11, 2018 2:02 AM
> To: Feng, YunhuaX <yunhuax.feng@intel.com>; edk2-devel@lists.01.org
> Cc: Gao, Liming <liming.gao@intel.com>
> Subject: Re: [edk2] [PATCH 1/3] BaseTools: Correct GenSec argument
> dummy free memory issue
> 
> On 04/11/18 09:57, Laszlo Ersek wrote:
> > Hello Yunhua,
> >
> > On 04/10/18 03:09, Feng, YunhuaX wrote:
> >> 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(-)
> >
> > can you please post patch sets with a cover letter, and with shallow
> > threading enabled?
> >
> > The following three commands [1] should configure shallow threading
> > permanently:
> >
> > git config format.coverletter     true
> > git config sendemail.chainreplyto false
> > git config sendemail.thread       true
> 
> A related request: please run the following two commands:
> 
> git config user.name  'Yunhua Feng'
> git config user.email yunhuax.feng@intel.com
> 
> The reason I'm asking for this is that your authorship information is
> currently recorded in git like this (please see commit 6ecab5ad077e):
> 
> Author: Feng, YunhuaX </o=Intel/ou=Exchange Administrative Group
> (FYDIBOHF23SPDLT)/cn=Recipients/cn=Feng, YunhuaX4e1>
> 
> That "thing" in the <> brackets is not an email address.
> 
> I suggest that your authorship information (which is used for new
> commits you create) be identical to the name and email address that you
> use in your Signed-off-by line. The above two git-config commands will
> do that.
> 
> Thanks!
> Laszlo
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-04-11 14:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2018-04-11  7:57 ` Laszlo Ersek
2018-04-11  9:02   ` Laszlo Ersek
2018-04-11 14:27     ` Carsey, Jaben

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox