MdeModulePkg MemoryProfile: ASSERT to ensure 'DriverInfoData' is not NULL

Code logic ensures that the pointer 'DriverInfoData' will not be NULL when
it is used.

Add ASSERT as warning for case that will not happen.

Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
Hao Wu 2016-07-07 08:49:38 +08:00
parent e895641ba9
commit d8162f5b32
2 changed files with 2 additions and 0 deletions

View File

@ -442,6 +442,7 @@ BuildDriverInfo (
if (EFI_ERROR (Status)) {
return NULL;
}
ASSERT (DriverInfoData != NULL);
ZeroMem (DriverInfoData, sizeof (*DriverInfoData));

View File

@ -443,6 +443,7 @@ BuildDriverInfo (
if (EFI_ERROR (Status)) {
return NULL;
}
ASSERT (DriverInfoData != NULL);
ZeroMem (DriverInfoData, sizeof (*DriverInfoData));