summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c')
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
index 7693835b88..5491f6de57 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
@@ -1,7 +1,7 @@
/** @file
Main file for Dmem shell Debug1 function.
- Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
This program and the accompanying materials
@@ -68,7 +68,9 @@ DisplayMmioMemory(
return (SHELL_NOT_FOUND);
}
Buffer = AllocateZeroPool(Size);
- ASSERT(Buffer != NULL);
+ if (Buffer == NULL) {
+ return SHELL_OUT_OF_RESOURCES;
+ }
Status = PciRbIo->Mem.Read(PciRbIo, EfiPciWidthUint8, (UINT64)(UINTN)Address, Size, Buffer);
if (EFI_ERROR(Status)) {