summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/UefiHiiLib
diff options
context:
space:
mode:
authorsfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-08 02:55:30 +0000
committersfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-08 02:55:30 +0000
commit02a758cb0b5bc8775d95e0a52acc483f850124a1 (patch)
tree97021cedc2e4bf82766ce9a5f74c4beaf345833d /MdeModulePkg/Library/UefiHiiLib
parent4bc6ad3935d7b57e5eacda5e6e70b32d786d43dd (diff)
downloadedk2-platforms-02a758cb0b5bc8775d95e0a52acc483f850124a1.tar.xz
Add pointer check for NULL before dereference it.
Signed-off-by: sfu5 Reviewed-by: xdu2 Reviewed-by: ydong10 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12514 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Library/UefiHiiLib')
-rw-r--r--MdeModulePkg/Library/UefiHiiLib/HiiLib.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
index ea347fd82a..a87441e2c0 100644
--- a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
+++ b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
@@ -2446,9 +2446,7 @@ InternalHiiGrowOpCodeHandle (
OpCodeBuffer->BufferSize + (Size + HII_LIB_OPCODE_ALLOCATION_SIZE),
OpCodeBuffer->Buffer
);
- if (Buffer == NULL) {
- return NULL;
- }
+ ASSERT (Buffer != NULL);
OpCodeBuffer->Buffer = Buffer;
OpCodeBuffer->BufferSize += (Size + HII_LIB_OPCODE_ALLOCATION_SIZE);
}