mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
5db2b1e12d
commit
08aa37e015
|
@ -1314,8 +1314,10 @@ DevNullTextOutSetMode (
|
||||||
Private->TextOutMode.Mode = (INT32) ModeNumber;
|
Private->TextOutMode.Mode = (INT32) ModeNumber;
|
||||||
Private->DevNullColumns = Column;
|
Private->DevNullColumns = Column;
|
||||||
Private->DevNullRows = Row;
|
Private->DevNullRows = Row;
|
||||||
|
|
||||||
FreePool (Private->DevNullScreen);
|
if (Private->DevNullScreen != NULL) {
|
||||||
|
FreePool (Private->DevNullScreen);
|
||||||
|
}
|
||||||
|
|
||||||
Size = (Row * (Column + 1)) * sizeof (CHAR16);
|
Size = (Row * (Column + 1)) * sizeof (CHAR16);
|
||||||
Private->DevNullScreen = AllocateZeroPool (Size);
|
Private->DevNullScreen = AllocateZeroPool (Size);
|
||||||
|
@ -1323,7 +1325,9 @@ DevNullTextOutSetMode (
|
||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
FreePool (Private->DevNullAttributes);
|
if (Private->DevNullAttributes != NULL) {
|
||||||
|
FreePool (Private->DevNullAttributes);
|
||||||
|
}
|
||||||
|
|
||||||
Size = Row * Column * sizeof (INT32);
|
Size = Row * Column * sizeof (INT32);
|
||||||
Private->DevNullAttributes = AllocateZeroPool (Size);
|
Private->DevNullAttributes = AllocateZeroPool (Size);
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<GuidValue>9E863906-A40F-4875-977F-5B93FF237FC6</GuidValue>
|
<GuidValue>9E863906-A40F-4875-977F-5B93FF237FC6</GuidValue>
|
||||||
<Version>1.0</Version>
|
<Version>1.0</Version>
|
||||||
<Abstract>Component description file for Terminal module.</Abstract>
|
<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>
|
<Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>
|
||||||
<License>All rights reserved. This program and the accompanying materials
|
<License>All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
|
Loading…
Reference in New Issue