summaryrefslogtreecommitdiff
path: root/ShellPkg/Application/Shell/ConsoleLogger.c
diff options
context:
space:
mode:
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2010-10-04 16:24:30 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2010-10-04 16:24:30 +0000
commit3c865f2064d37eaccd1693b878596d5138b0b38e (patch)
treeffe10112e71c18c5c4ec56f37cc670258b22fd5b /ShellPkg/Application/Shell/ConsoleLogger.c
parentaca84419c4b5128b69215b8f6e4d34c36efb1fbc (diff)
downloadedk2-platforms-3c865f2064d37eaccd1693b878596d5138b0b38e.tar.xz
1) Removing ASSERTs for proper return values.
2) Verifying that memory allocations were successful. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10904 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Application/Shell/ConsoleLogger.c')
-rw-r--r--ShellPkg/Application/Shell/ConsoleLogger.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ShellPkg/Application/Shell/ConsoleLogger.c b/ShellPkg/Application/Shell/ConsoleLogger.c
index 4b0d94d245..2b84d87adb 100644
--- a/ShellPkg/Application/Shell/ConsoleLogger.c
+++ b/ShellPkg/Application/Shell/ConsoleLogger.c
@@ -39,8 +39,10 @@ ConsoleLoggerInstall(
EFI_STATUS Status;
ASSERT(ConsoleInfo != NULL);
- *ConsoleInfo = AllocatePool(sizeof(CONSOLE_LOGGER_PRIVATE_DATA));
- ASSERT(ConsoleInfo != NULL);
+ (*ConsoleInfo) = AllocatePool(sizeof(CONSOLE_LOGGER_PRIVATE_DATA));
+ if ((*ConsoleInfo) == NULL) {
+ return (EFI_OUT_OF_RESOURCES);
+ }
(*ConsoleInfo)->Signature = CONSOLE_LOGGER_PRIVATE_DATA_SIGNATURE;
(*ConsoleInfo)->OldConOut = NULL;