From: Jiewen Yao Date: Thu, 2 Jun 2016 08:37:58 +0000 (+0800) Subject: MdePkg/Hsti: Fix a memory allocation check issue. X-Git-Tag: edk2-stable201903~6896 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=d3858e1006f3b88cb510f7c71452a53ff6f75c05 MdePkg/Hsti: Fix a memory allocation check issue. Cc: Liming Gao Cc: Amy Chan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao Reviewed-by: Liming Gao Reviewed-by: Amy Chan --- diff --git a/MdePkg/Library/DxeHstiLib/HstiDxe.c b/MdePkg/Library/DxeHstiLib/HstiDxe.c index 114a767526..c032a98647 100644 --- a/MdePkg/Library/DxeHstiLib/HstiDxe.c +++ b/MdePkg/Library/DxeHstiLib/HstiDxe.c @@ -297,7 +297,7 @@ HstiLibSetTable ( return EFI_OUT_OF_RESOURCES; } HstiAip->Hsti = AllocateCopyPool (HstiSize, Hsti); - if (HstiAip == NULL) { + if (HstiAip->Hsti == NULL) { FreePool (HstiAip); return EFI_OUT_OF_RESOURCES; }