MdePkg/Hsti: Fix a memory allocation check issue.
authorJiewen Yao <jiewen.yao@intel.com>
Thu, 2 Jun 2016 08:37:58 +0000 (16:37 +0800)
committerJiewen Yao <jiewen.yao@intel.com>
Mon, 6 Jun 2016 01:18:24 +0000 (09:18 +0800)
Cc: Liming Gao <Liming.Gao@intel.com>
Cc: Amy Chan <Amy.Chan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <Jiewen.Yao@intel.com>
Reviewed-by: Liming Gao <Liming.Gao@intel.com>
Reviewed-by: Amy Chan <Amy.Chan@intel.com>
MdePkg/Library/DxeHstiLib/HstiDxe.c

index 114a767..c032a98 100644 (file)
@@ -297,7 +297,7 @@ HstiLibSetTable (
     return EFI_OUT_OF_RESOURCES;\r
   }\r
   HstiAip->Hsti = AllocateCopyPool (HstiSize, Hsti);\r
-  if (HstiAip == NULL) {\r
+  if (HstiAip->Hsti == NULL) {\r
     FreePool (HstiAip);\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r