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>
FileBuffer = (UINT8 *) malloc (InputLength);\r
if (FileBuffer == NULL) {\r
Error (NULL, 0, 4001, "Resource:", "Memory cannot be allocated!");\r
FileBuffer = (UINT8 *) malloc (InputLength);\r
if (FileBuffer == NULL) {\r
Error (NULL, 0, 4001, "Resource:", "Memory cannot be allocated!");\r
}\r
\r
Status = GetFileContents (\r
}\r
\r
Status = GetFileContents (\r
}\r
\r
if (EFI_ERROR(Status)) {\r
}\r
\r
if (EFI_ERROR(Status)) {\r
- free(FileBuffer);\r
- return 1;\r
+ Error (NULL, 0, 0004, "Error getting contents of file: %s", InputFileName);\r
+ goto ERROR;\r
}\r
\r
if (OutputFileName == NULL) {\r
}\r
\r
if (OutputFileName == NULL) {\r