diff options
author | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-11-16 22:31:47 +0000 |
---|---|---|
committer | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-11-16 22:31:47 +0000 |
commit | 8be0ba36fc347bac7199e7dbb8d373ea5e4bf0af (patch) | |
tree | dae01e5f35729e4c999cbebd91582a38aba14582 /ShellPkg/Application/Shell/ConsoleLogger.c | |
parent | 3a4932d079cdd65c72086ea682820a26e2bb52ad (diff) | |
download | edk2-platforms-8be0ba36fc347bac7199e7dbb8d373ea5e4bf0af.tar.xz |
fixes for IPF, CTRL-C support, and file redirection.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11066 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Application/Shell/ConsoleLogger.c')
-rw-r--r-- | ShellPkg/Application/Shell/ConsoleLogger.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ShellPkg/Application/Shell/ConsoleLogger.c b/ShellPkg/Application/Shell/ConsoleLogger.c index 2b84d87adb..4b237bf6e9 100644 --- a/ShellPkg/Application/Shell/ConsoleLogger.c +++ b/ShellPkg/Application/Shell/ConsoleLogger.c @@ -76,10 +76,19 @@ ConsoleLoggerInstall( Status = ConsoleLoggerResetBuffers(*ConsoleInfo);
if (EFI_ERROR(Status)) {
+ SHELL_FREE_NON_NULL((*ConsoleInfo));
+ *ConsoleInfo = NULL;
return (Status);
}
Status = gBS->InstallProtocolInterface(&gImageHandle, &gEfiSimpleTextOutProtocolGuid, EFI_NATIVE_INTERFACE, (VOID*)&((*ConsoleInfo)->OurConOut));
+ if (EFI_ERROR(Status)) {
+ SHELL_FREE_NON_NULL((*ConsoleInfo)->Buffer);
+ SHELL_FREE_NON_NULL((*ConsoleInfo)->Attributes);
+ SHELL_FREE_NON_NULL((*ConsoleInfo));
+ *ConsoleInfo = NULL;
+ return (Status);
+ }
(*ConsoleInfo)->OldConOut = gST->ConOut;
(*ConsoleInfo)->OldConHandle = gST->ConsoleOutHandle;
|