summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MdeModulePkg/Universal/PCD/Dxe/Service.c1
-rw-r--r--MdeModulePkg/Universal/PCD/Pei/Service.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.c b/MdeModulePkg/Universal/PCD/Dxe/Service.c
index 54c814b562..a9c4c10951 100644
--- a/MdeModulePkg/Universal/PCD/Dxe/Service.c
+++ b/MdeModulePkg/Universal/PCD/Dxe/Service.c
@@ -169,6 +169,7 @@ GetPcdName (
// Need to get the full PCD name.
//
Name = AllocateZeroPool (AsciiStrSize (TokenSpaceName) + AsciiStrSize (PcdName));
+ ASSERT (Name != NULL);
//
// Catenate TokenSpaceCName and PcdCName with a '.' to form the full PCD name.
//
diff --git a/MdeModulePkg/Universal/PCD/Pei/Service.c b/MdeModulePkg/Universal/PCD/Pei/Service.c
index e42d045d27..a4e35c2792 100644
--- a/MdeModulePkg/Universal/PCD/Pei/Service.c
+++ b/MdeModulePkg/Universal/PCD/Pei/Service.c
@@ -138,6 +138,7 @@ GetPcdName (
// Need to get the full PCD name.
//
Name = AllocateZeroPool (AsciiStrSize (TokenSpaceName) + AsciiStrSize (PcdName));
+ ASSERT (Name != NULL);
//
// Catenate TokenSpaceCName and PcdCName with a '.' to form the full PCD name.
//