diff options
author | Ruiyu Ni <ruiyu.ni@intel.com> | 2017-01-10 13:55:22 +0800 |
---|---|---|
committer | Ruiyu Ni <ruiyu.ni@intel.com> | 2017-01-11 17:25:26 +0800 |
commit | 0d8b3f81ac31c707cd5be21a397b802c5a217abc (patch) | |
tree | 24d923bcccf63abb48333c87e12efc53c7b5aae7 /MdeModulePkg | |
parent | b7cf1c07479bbe5a3d5fd3c944b2ab76f740c072 (diff) | |
download | edk2-platforms-0d8b3f81ac31c707cd5be21a397b802c5a217abc.tar.xz |
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>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c index b8dcf0c472..604bda73af 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c @@ -1356,19 +1356,14 @@ TerminalDriverBindingStop ( );
} else {
- if (TerminalDevice->ControllerNameTable != NULL) {
- FreeUnicodeStringTable (TerminalDevice->ControllerNameTable);
- }
-
+ 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->TerminalConsoleModeData);
FreePool (TerminalDevice);
}
}
|