MdeModulePkg DxeCore: Check pointer AllocInfoData before dereferencing.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16453 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Star Zeng 2014-11-27 02:51:04 +00:00 committed by lzeng14
parent a71c80b668
commit 80fbf58632

View File

@ -838,6 +838,7 @@ CoreUpdateProfileAllocate (
if (EFI_ERROR (Status)) {
return FALSE;
}
ASSERT (AllocInfoData != NULL);
AllocInfo = &AllocInfoData->AllocInfo;
AllocInfoData->Signature = MEMORY_PROFILE_ALLOC_INFO_SIGNATURE;
AllocInfo->Header.Signature = MEMORY_PROFILE_ALLOC_INFO_SIGNATURE;