summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Application/Shell/ShellParametersProtocol.c
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2016-07-08 15:18:14 +0800
committerRuiyu Ni <ruiyu.ni@intel.com>2016-07-18 10:54:59 +0800
commit31e5b912b99e0fb39e81f70bc24a4be589191abb (patch)
treec9bdc2f2a966a35327231d833e935b5d33571739 /ShellPkg/Application/Shell/ShellParametersProtocol.c
parentb2c036a7f016bc8808c5eb8eb3dd5399a96664b9 (diff)
downloadedk2-31e5b912b99e0fb39e81f70bc24a4be589191abb.tar.gz
edk2-31e5b912b99e0fb39e81f70bc24a4be589191abb.tar.bz2
edk2-31e5b912b99e0fb39e81f70bc24a4be589191abb.zip
ShellPkg/IsVolatileEnv: Handle memory allocation failure
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Diffstat (limited to 'ShellPkg/Application/Shell/ShellParametersProtocol.c')
-rw-r--r--ShellPkg/Application/Shell/ShellParametersProtocol.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ShellPkg/Application/Shell/ShellParametersProtocol.c b/ShellPkg/Application/Shell/ShellParametersProtocol.c
index b3767bbbf2..3684f9cd82 100644
--- a/ShellPkg/Application/Shell/ShellParametersProtocol.c
+++ b/ShellPkg/Application/Shell/ShellParametersProtocol.c
@@ -736,6 +736,7 @@ UpdateStdInStdOutStdErr(
UINTN Size;
SPLIT_LIST *Split;
CHAR16 *FirstLocation;
+ BOOLEAN Volatile;
OutUnicode = TRUE;
InUnicode = TRUE;
@@ -1111,8 +1112,8 @@ UpdateStdInStdOutStdErr(
//
// Check for no volatile environment variables
//
- ||(StdErrVarName != NULL && !IsVolatileEnv(StdErrVarName))
- ||(StdOutVarName != NULL && !IsVolatileEnv(StdOutVarName))
+ ||(StdErrVarName != NULL && !EFI_ERROR (IsVolatileEnv (StdErrVarName, &Volatile)) && !Volatile)
+ ||(StdOutVarName != NULL && !EFI_ERROR (IsVolatileEnv (StdOutVarName, &Volatile)) && !Volatile)
//
// Cant redirect during a reconnect operation.
//