diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-03-14 07:42:20 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-03-14 07:42:20 +0000 |
commit | 08aa37e0157271b87e917c598260644920c4ed57 (patch) | |
tree | 94fa2c20ace2cf9ca2a4a7ea1924561a9649e3ca /EdkModulePkg | |
parent | 5db2b1e12dc03ce256c3c36b918147d4cf4b2928 (diff) | |
download | edk2-platforms-08aa37e0157271b87e917c598260644920c4ed57.tar.xz |
Add check whether input parameter is NULL before call freepool API defined in MDE.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2461 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg')
-rw-r--r-- | EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitterGraphics.c | 10 | ||||
-rw-r--r-- | EdkModulePkg/Universal/Console/Terminal/Dxe/Terminal.msa | 2 |
2 files changed, 8 insertions, 4 deletions
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 @@ <GuidValue>9E863906-A40F-4875-977F-5B93FF237FC6</GuidValue>
<Version>1.0</Version>
<Abstract>Component description file for Terminal module.</Abstract>
- <Description>This driver installs Simple Text In/Out protocol for terminal devices.</Description>
+ <Description>This driver installs Simple Text In/Out protocol for terminal devices (serial devices or hotplug devices).</Description>
<Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>
<License>All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
|