summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/PiSmmCore
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2016-07-07 03:49:38 +0300
committerHao Wu <hao.a.wu@intel.com>2016-07-12 03:53:18 +0300
commitd8162f5b3283a06a6dc4e2e05cd0c45fc4358eb0 (patch)
tree595878c17ab15ffce81c08cca59eec086dc889ce /MdeModulePkg/Core/PiSmmCore
parente895641ba9a8818d2694d30f42644356c022c2c4 (diff)
downloadedk2-d8162f5b3283a06a6dc4e2e05cd0c45fc4358eb0.tar.xz
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>
Diffstat (limited to 'MdeModulePkg/Core/PiSmmCore')
-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 ac832ce38c..93585f199d 100644
--- a/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c
+++ b/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c
@@ -443,6 +443,7 @@ BuildDriverInfo (
if (EFI_ERROR (Status)) {
return NULL;
}
+ ASSERT (DriverInfoData != NULL);
ZeroMem (DriverInfoData, sizeof (*DriverInfoData));