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

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