diff --git a/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitterGraphics.c b/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitterGraphics.c
index 9faeb56d12..2f60e11c40 100644
--- a/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitterGraphics.c
+++ b/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitterGraphics.c
@@ -1314,8 +1314,10 @@ DevNullTextOutSetMode (
Private->TextOutMode.Mode = (INT32) ModeNumber;
Private->DevNullColumns = Column;
Private->DevNullRows = Row;
-
- FreePool (Private->DevNullScreen);
+
+ if (Private->DevNullScreen != NULL) {
+ FreePool (Private->DevNullScreen);
+ }
Size = (Row * (Column + 1)) * sizeof (CHAR16);
Private->DevNullScreen = AllocateZeroPool (Size);
@@ -1323,7 +1325,9 @@ DevNullTextOutSetMode (
return EFI_OUT_OF_RESOURCES;
}
- FreePool (Private->DevNullAttributes);
+ if (Private->DevNullAttributes != NULL) {
+ FreePool (Private->DevNullAttributes);
+ }
Size = Row * Column * sizeof (INT32);
Private->DevNullAttributes = AllocateZeroPool (Size);
diff --git a/EdkModulePkg/Universal/Console/Terminal/Dxe/Terminal.msa b/EdkModulePkg/Universal/Console/Terminal/Dxe/Terminal.msa
index 3403b35b75..8a281d763e 100644
--- a/EdkModulePkg/Universal/Console/Terminal/Dxe/Terminal.msa
+++ b/EdkModulePkg/Universal/Console/Terminal/Dxe/Terminal.msa
@@ -6,7 +6,7 @@
9E863906-A40F-4875-977F-5B93FF237FC6
1.0
Component description file for Terminal module.
- This driver installs Simple Text In/Out protocol for terminal devices.
+ This driver installs Simple Text In/Out protocol for terminal devices (serial devices or hotplug devices).
Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License