summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core
diff options
context:
space:
mode:
authorQiu Shumin <shumin.qiu@intel.com>2016-02-25 13:00:28 +0800
committerQiu Shumin <shumin.qiu@intel.com>2016-02-26 14:59:22 +0800
commit4cb6375ca6ddf73577758a72b1464896c3eae767 (patch)
tree221247a6416ef381bcdf466f3790c2576c9e7600 /MdeModulePkg/Core
parentba33c80fc594404872bc6f33e48d38836e9384a0 (diff)
downloadedk2-platforms-4cb6375ca6ddf73577758a72b1464896c3eae767.tar.xz
MdeModulePkg: Add ASSERT to make sure pointer 'MemoryMap' is not NULL.
If 'CoreGetMemoryMap' return success the 'MemoryMap' shouldn't be NULL. Add code to make sure this. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Yao Jiewen <Jiewen.Yao@intel.com>
Diffstat (limited to 'MdeModulePkg/Core')
-rw-r--r--MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c b/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c
index ebe70966db..32497c1c0c 100644
--- a/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c
+++ b/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c
@@ -790,6 +790,7 @@ CoreGetMemoryMapPropertiesTable (
if (Status == EFI_BUFFER_TOO_SMALL) {
*MemoryMapSize = *MemoryMapSize + (*DescriptorSize) * AdditionalRecordCount;
} else if (Status == EFI_SUCCESS) {
+ ASSERT (MemoryMap != NULL);
if (OldMemoryMapSize - *MemoryMapSize < (*DescriptorSize) * AdditionalRecordCount) {
*MemoryMapSize = *MemoryMapSize + (*DescriptorSize) * AdditionalRecordCount;
//