MdeModulePkg/TerminalDxe: Remove unnecessary NULL pointer check

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
This commit is contained in:
Ruiyu Ni 2017-01-10 13:55:22 +08:00
parent b7cf1c0747
commit 0d8b3f81ac
1 changed files with 2 additions and 7 deletions

View File

@ -1356,19 +1356,14 @@ TerminalDriverBindingStop (
);
} else {
if (TerminalDevice->ControllerNameTable != NULL) {
FreeUnicodeStringTable (TerminalDevice->ControllerNameTable);
}
StopTerminalStateMachine (TerminalDevice);
gBS->CloseEvent (TerminalDevice->SimpleInput.WaitForKey);
gBS->CloseEvent (TerminalDevice->SimpleInputEx.WaitForKeyEx);
gBS->CloseEvent (TerminalDevice->KeyNotifyProcessEvent);
TerminalFreeNotifyList (&TerminalDevice->NotifyList);
FreePool (TerminalDevice->DevicePath);
if (TerminalDevice->TerminalConsoleModeData != NULL) {
FreePool (TerminalDevice->TerminalConsoleModeData);
}
FreePool (TerminalDevice);
}
}