mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 15:44:04 +02:00
Add ASSERT to check if NewVariable is NULL.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Elvin Li <elvin.li@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15407 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
d6e88a6c60
commit
4b0786b4fa
@ -1444,6 +1444,7 @@ TerminalUpdateConsoleDevVariable (
|
|||||||
for (TerminalType = PCANSITYPE; TerminalType <= VTUTF8TYPE; TerminalType++) {
|
for (TerminalType = PCANSITYPE; TerminalType <= VTUTF8TYPE; TerminalType++) {
|
||||||
SetTerminalDevicePath (TerminalType, ParentDevicePath, &TempDevicePath);
|
SetTerminalDevicePath (TerminalType, ParentDevicePath, &TempDevicePath);
|
||||||
NewVariable = AppendDevicePathInstance (Variable, TempDevicePath);
|
NewVariable = AppendDevicePathInstance (Variable, TempDevicePath);
|
||||||
|
ASSERT (NewVariable != NULL);
|
||||||
if (Variable != NULL) {
|
if (Variable != NULL) {
|
||||||
FreePool (Variable);
|
FreePool (Variable);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user