]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Add check whether input parameter is NULL before call freepool API defined in MDE.
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 14 Mar 2007 07:42:20 +0000 (07:42 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 14 Mar 2007 07:42:20 +0000 (07:42 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2461 6f19259b-4bc3-4df7-8a09-765794883524

EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitterGraphics.c
EdkModulePkg/Universal/Console/Terminal/Dxe/Terminal.msa

index 9faeb56d12dac8a597b411d888d99034323e16d2..2f60e11c40bb67eb431529a2f40ad485d8a77845 100644 (file)
@@ -1314,8 +1314,10 @@ DevNullTextOutSetMode (
     Private->TextOutMode.Mode = (INT32) ModeNumber;\r
     Private->DevNullColumns   = Column;\r
     Private->DevNullRows      = Row;\r
-\r
-    FreePool (Private->DevNullScreen);\r
+    \r
+    if (Private->DevNullScreen != NULL) {\r
+      FreePool (Private->DevNullScreen);\r
+    }\r
 \r
     Size                    = (Row * (Column + 1)) * sizeof (CHAR16);\r
     Private->DevNullScreen  = AllocateZeroPool (Size);\r
@@ -1323,7 +1325,9 @@ DevNullTextOutSetMode (
       return EFI_OUT_OF_RESOURCES;\r
     }\r
 \r
-    FreePool (Private->DevNullAttributes);\r
+    if (Private->DevNullAttributes != NULL) {\r
+      FreePool (Private->DevNullAttributes);\r
+    }\r
 \r
     Size                        = Row * Column * sizeof (INT32);\r
     Private->DevNullAttributes  = AllocateZeroPool (Size);\r
index 3403b35b75c26c91667bc01ad8325b446b3871e8..8a281d763e773d6558dd6f02b4203d04335c8f4c 100644 (file)
@@ -6,7 +6,7 @@
     <GuidValue>9E863906-A40F-4875-977F-5B93FF237FC6</GuidValue>\r
     <Version>1.0</Version>\r
     <Abstract>Component description file for Terminal module.</Abstract>\r
-    <Description>This driver installs Simple Text In/Out protocol for terminal devices.</Description>\r
+    <Description>This driver installs Simple Text In/Out protocol for terminal devices (serial devices or hotplug devices).</Description>\r
     <Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>\r
     <License>All rights reserved. This program and the accompanying materials\r
       are licensed and made available under the terms and conditions of the BSD License\r