X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=BaseTools%2FSource%2FC%2FTianoCompress%2FTianoCompress.c;h=44dbccf9ad2bd046f9e50b4cf946b9dedc3b08b6;hb=076947cfceaa5c87f18306bd29b22caaa392d2f5;hp=93cb6c3ac31427f1de6e6f4c4c3c32618f708f76;hpb=b14f278de4c8a3a5b8aec99d70083b02d786d6c9;p=mirror_edk2.git diff --git a/BaseTools/Source/C/TianoCompress/TianoCompress.c b/BaseTools/Source/C/TianoCompress/TianoCompress.c index 93cb6c3ac3..44dbccf9ad 100644 --- a/BaseTools/Source/C/TianoCompress/TianoCompress.c +++ b/BaseTools/Source/C/TianoCompress/TianoCompress.c @@ -1906,7 +1906,7 @@ Returns: FileBuffer = (UINT8 *) malloc (InputLength); if (FileBuffer == NULL) { Error (NULL, 0, 4001, "Resource:", "Memory cannot be allocated!"); - return 1; + goto ERROR; } Status = GetFileContents ( @@ -1917,8 +1917,8 @@ Returns: } if (EFI_ERROR(Status)) { - free(FileBuffer); - return 1; + Error (NULL, 0, 0004, "Error getting contents of file: %s", InputFileName); + goto ERROR; } if (OutputFileName == NULL) {