summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2017-11-30 16:40:42 +0800
committerHao Wu <hao.a.wu@intel.com>2017-12-25 09:53:56 +0800
commit9edcd2788d7baa767b0761f0917c014612b6d72a (patch)
tree03b3480563cab2f104be83788b417696d7d39bf5 /BaseTools/Source
parentb567adb81e16e009ada73dfa2fbd5a0f9688d78f (diff)
downloadedk2-9edcd2788d7baa767b0761f0917c014612b6d72a.tar.gz
edk2-9edcd2788d7baa767b0761f0917c014612b6d72a.tar.bz2
edk2-9edcd2788d7baa767b0761f0917c014612b6d72a.zip
BaseTools/VfrCompile: Assign 'NULL' for closed file handle
Assign 'NULL' value to the already-closed file handle to avoid closing the handle multiple times. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source')
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrCompiler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp b/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp
index 831f6b5174..ff2a837dfc 100644
--- a/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp
+++ b/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp
@@ -2,7 +2,7 @@
VfrCompiler main class and main function.
-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2017, 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
@@ -703,6 +703,7 @@ CVfrCompiler::Compile (
}
fclose (pInFile);
+ pInFile = NULL;
if (gCFormPkg.HavePendingUnassigned () == TRUE) {
gCFormPkg.PendingAssignPrintAll ();