From: Feng, YunhuaX Date: Tue, 10 Apr 2018 01:09:45 +0000 (+0800) Subject: BaseTools: Correct GenSec argument dummy free memory issue X-Git-Tag: edk2-stable201903~1929 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=6ecab5ad077ea34467ff29ea1f5b77fa5c1e3447 BaseTools: Correct GenSec argument dummy free memory issue Free DummyFileBuffer and set DummyFileBuffer to NULL. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng Reviewed-by: Yonghong Zhu --- 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,7 +1,7 @@ /** @file Creates output file that is a properly formed section per the PI spec. -Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
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 @@ -1376,6 +1376,7 @@ Returns: } if (DummyFileBuffer != NULL) { free (DummyFileBuffer); + DummyFileBuffer = NULL; } if (InFileBuffer != NULL) { free (InFileBuffer);