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>
if (InFile_Open(&inStream.file, inputFile) != 0)\r
return PrintError(rs, "Can not open input file");\r
\r
- if (OutFile_Open(&outStream.file, outputFile) != 0)\r
+ if (OutFile_Open(&outStream.file, outputFile) != 0) {\r
+ File_Close(&inStream.file);\r
return PrintError(rs, "Can not open output file");\r
+ }\r
\r
File_GetLength(&inStream.file, &fileSize);\r
\r