summaryrefslogtreecommitdiff
path: root/Core
diff options
context:
space:
mode:
authorJeff Westfahl <jeff.westfahl@ni.com>2017-05-13 04:41:40 +0800
committerGuo Mang <mang.guo@intel.com>2017-07-12 11:24:52 +0800
commit898dfba71965d11c350e349828ebddddb9090353 (patch)
treebab56df48d27b6c1a05d8ac2f9fc5400dde57178 /Core
parentdd8ee7179e1aa88ee5ca289faebdacaaf8809bb8 (diff)
downloadedk2-platforms-898dfba71965d11c350e349828ebddddb9090353.tar.xz
ShellPkg/UefiShellLib: Check correct variable for NULL
Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> (cherry picked from commit 5220897839dd583e9d1f749fb4d8196ff86ccc8b)
Diffstat (limited to 'Core')
-rw-r--r--Core/ShellPkg/Library/UefiShellLib/UefiShellLib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Core/ShellPkg/Library/UefiShellLib/UefiShellLib.c b/Core/ShellPkg/Library/UefiShellLib/UefiShellLib.c
index 55e8a67ac4..0f37886956 100644
--- a/Core/ShellPkg/Library/UefiShellLib/UefiShellLib.c
+++ b/Core/ShellPkg/Library/UefiShellLib/UefiShellLib.c
@@ -702,7 +702,7 @@ ShellOpenFileByName(
// Create the directory to create the file in
//
FileNameCopy = AllocateCopyPool (StrSize (FileName), FileName);
- if (FileName == NULL) {
+ if (FileNameCopy == NULL) {
return (EFI_OUT_OF_RESOURCES);
}
PathCleanUpDirectories (FileNameCopy);