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
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user