mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-26 07:04:28 +02:00
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>
This commit is contained in:
parent
197b8f261b
commit
9639f7d378
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Calculate Crc32 value and Verify Crc32 value for input data.
|
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
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -289,6 +289,7 @@ Returns:
|
|||||||
FileBuffer = (UINT8 *) malloc (FileSize);
|
FileBuffer = (UINT8 *) malloc (FileSize);
|
||||||
if (FileBuffer == NULL) {
|
if (FileBuffer == NULL) {
|
||||||
Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated!");
|
Error (NULL, 0, 4001, "Resource", "memory cannot be allcoated!");
|
||||||
|
fclose (InFile);
|
||||||
goto Finish;
|
goto Finish;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user