mirror of https://github.com/acidanthera/audk.git
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:
parent
e895641ba9
commit
d8162f5b32
|
@ -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));
|
||||
|
||||
|
|
Loading…
Reference in New Issue