summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElvin Li <elvin.li@intel.com>2014-03-28 02:13:41 +0000
committerli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>2014-03-28 02:13:41 +0000
commit4b0786b4fa46f89287293b514afd1ef5d4c24d07 (patch)
treeab6daedb55bc0988706d250b067c43fd8616c1ad
parentd6e88a6c60f49c73bea31a0f653d85c6f358ff0d (diff)
downloadedk2-4b0786b4fa46f89287293b514afd1ef5d4c24d07.tar.gz
edk2-4b0786b4fa46f89287293b514afd1ef5d4c24d07.tar.bz2
edk2-4b0786b4fa46f89287293b514afd1ef5d4c24d07.zip
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
-rw-r--r--MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
index 511094844b..966fb79ce4 100644
--- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
@@ -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);
}