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:
@@ -442,6 +442,7 @@ BuildDriverInfo (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return NULL;
|
||||
}
|
||||
ASSERT (DriverInfoData != NULL);
|
||||
|
||||
ZeroMem (DriverInfoData, sizeof (*DriverInfoData));
|
||||
|
||||
|
@@ -443,6 +443,7 @@ BuildDriverInfo (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return NULL;
|
||||
}
|
||||
ASSERT (DriverInfoData != NULL);
|
||||
|
||||
ZeroMem (DriverInfoData, sizeof (*DriverInfoData));
|
||||
|
||||
|
Reference in New Issue
Block a user