summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2016-07-07 08:49:38 +0800
committerHao Wu <hao.a.wu@intel.com>2016-07-12 16:08:32 +0800
commit3695c596f6cf395e8c52545e5f9cc30e1aef2033 (patch)
tree359e52c887db6cbeef0a17cfe2f41fe6780351d8
parent0856396e67562cf7f288f176a09bb1c6e0ea6464 (diff)
downloadedk2-3695c596f6cf395e8c52545e5f9cc30e1aef2033.tar.gz
MdeModulePkg MemoryProfile: ASSERT to ensure 'DriverInfoData' is not NULL
(Sync missing part of commit d8162f5b3283a06a6dc4e2e05cd0c45fc4358eb0 from master) 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> (cherry picked from commit d8162f5b3283a06a6dc4e2e05cd0c45fc4358eb0)
-rw-r--r--MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c b/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c
index fd44a5024e..0fa1643be7 100644
--- a/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c
+++ b/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c
@@ -263,6 +263,7 @@ BuildDriverInfo (
if (EFI_ERROR (Status)) {
return NULL;
}
+ ASSERT (DriverInfoData != NULL);
ZeroMem (DriverInfoData, sizeof (*DriverInfoData));