mirror of https://github.com/acidanthera/audk.git
BaseTools/LzmaCompress: 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
181c955937
commit
1880d5e4d0
|
@ -329,8 +329,10 @@ int main2(int numArgs, const char *args[], char *rs)
|
|||
if (InFile_Open(&inStream.file, inputFile) != 0)
|
||||
return PrintError(rs, "Can not open input file");
|
||||
|
||||
if (OutFile_Open(&outStream.file, outputFile) != 0)
|
||||
if (OutFile_Open(&outStream.file, outputFile) != 0) {
|
||||
File_Close(&inStream.file);
|
||||
return PrintError(rs, "Can not open output file");
|
||||
}
|
||||
|
||||
File_GetLength(&inStream.file, &fileSize);
|
||||
|
||||
|
|
Loading…
Reference in New Issue