summaryrefslogtreecommitdiff
path: root/BaseTools
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2016-10-11 15:47:02 +0800
committerHao Wu <hao.a.wu@intel.com>2016-11-08 16:37:59 +0800
commit9639f7d3783f2e624d6e11be19c49461d62cb5b5 (patch)
tree4c511ad0aee27fb3c0f522292edb214e39b7f79b /BaseTools
parent197b8f261b45c6900c2dc8e650e82e606184d50f (diff)
downloadedk2-platforms-9639f7d3783f2e624d6e11be19c49461d62cb5b5.tar.xz
BaseTools/GenCrc32: Fix file handles not being closed
Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/C/GenCrc32/GenCrc32.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/BaseTools/Source/C/GenCrc32/GenCrc32.c b/BaseTools/Source/C/GenCrc32/GenCrc32.c
index f4d129ee06..e1e11c6413 100644
--- a/BaseTools/Source/C/GenCrc32/GenCrc32.c
+++ b/BaseTools/Source/C/GenCrc32/GenCrc32.c
@@ -1,7 +1,7 @@
/** @file
Calculate Crc32 value and Verify Crc32 value for input data.
-Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2016, 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
@@ -289,6 +289,7 @@ Returns:
FileBuffer = (UINT8 *) malloc (FileSize);
if (FileBuffer == NULL) {
Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated!");
+ fclose (InFile);
goto Finish;
}