summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2017-01-10 13:55:22 +0800
committerRuiyu Ni <ruiyu.ni@intel.com>2017-01-11 17:25:26 +0800
commit0d8b3f81ac31c707cd5be21a397b802c5a217abc (patch)
tree24d923bcccf63abb48333c87e12efc53c7b5aae7
parentb7cf1c07479bbe5a3d5fd3c944b2ab76f740c072 (diff)
downloadedk2-0d8b3f81ac31c707cd5be21a397b802c5a217abc.zip
edk2-0d8b3f81ac31c707cd5be21a397b802c5a217abc.tar.gz
edk2-0d8b3f81ac31c707cd5be21a397b802c5a217abc.tar.bz2
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>
-rw-r--r--MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
index b8dcf0c..604bda7 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);
}
}