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:
Elvin Li 2014-03-28 02:13:41 +00:00 committed by li-elvin
parent d6e88a6c60
commit 4b0786b4fa
1 changed files with 1 additions and 0 deletions

View File

@ -1444,6 +1444,7 @@ TerminalUpdateConsoleDevVariable (
for (TerminalType = PCANSITYPE; TerminalType <= VTUTF8TYPE; TerminalType++) {
SetTerminalDevicePath (TerminalType, ParentDevicePath, &TempDevicePath);
NewVariable = AppendDevicePathInstance (Variable, TempDevicePath);
ASSERT (NewVariable != NULL);
if (Variable != NULL) {
FreePool (Variable);
}