MdeModulePkg/HiiDatabase: Refine GetImageIdOrAddress

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
This commit is contained in:
Ruiyu Ni
2016-09-21 11:10:38 +08:00
parent 75f273d85d
commit 7c28fcb849
3 changed files with 61 additions and 74 deletions

View File

@@ -1552,7 +1552,7 @@ InsertImagePackage (
if (ImageInfoOffset != 0) {
ImageSize = ImagePackage->ImagePkgHdr.Header.Length -
sizeof (EFI_HII_IMAGE_PACKAGE_HDR) - PaletteSize;
ImagePackage->ImageBlock = (UINT8 *) AllocateZeroPool (ImageSize);
ImagePackage->ImageBlock = AllocateZeroPool (ImageSize);
if (ImagePackage->ImageBlock == NULL) {
FreePool (ImagePackage->PaletteBlock);
FreePool (ImagePackage);