Add check of buffer value returned from AllocateZeroPool()
authormdkinney <mdkinney@de2fecce-e211-0410-80a6-f3fac2684e05>
Mon, 27 Aug 2007 23:30:37 +0000 (23:30 +0000)
committermdkinney <mdkinney@de2fecce-e211-0410-80a6-f3fac2684e05>
Mon, 27 Aug 2007 23:30:37 +0000 (23:30 +0000)
git-svn-id: https://edk2.tianocore.org/svn/edk2/trunk@3718 de2fecce-e211-0410-80a6-f3fac2684e05

edk2/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c

index c3e15d4..f70b076 100644 (file)
@@ -1130,6 +1130,9 @@ DevNullSyncGopStdOut (
   MaxColumn     = Private->DevNullColumns;\r
 \r
   Buffer        = AllocateZeroPool ((MaxColumn + 1) * sizeof (CHAR16));\r
+  if (Buffer == NULL) {\r
+    return ReturnStatus;\r
+  }\r
 \r
   for (Row = 0; Row < Private->DevNullRows; Row++, Screen += (MaxColumn + 1), Attributes += MaxColumn) {\r
 \r