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; }