summaryrefslogtreecommitdiffstats
path: root/ShellPkg
diff options
context:
space:
mode:
authorJeff Westfahl <jeff.westfahl@ni.com>2017-05-13 04:41:40 +0800
committerRuiyu Ni <ruiyu.ni@intel.com>2017-06-02 15:04:12 +0800
commit5220897839dd583e9d1f749fb4d8196ff86ccc8b (patch)
treec2237f58e74f6a787c369eede90cb503af5ead30 /ShellPkg
parentb33b1055b0026f36be97fb5ec6826436088e9a23 (diff)
downloadedk2-5220897839dd583e9d1f749fb4d8196ff86ccc8b.tar.gz
edk2-5220897839dd583e9d1f749fb4d8196ff86ccc8b.tar.bz2
edk2-5220897839dd583e9d1f749fb4d8196ff86ccc8b.zip
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>
Diffstat (limited to 'ShellPkg')
-rw-r--r--ShellPkg/Library/UefiShellLib/UefiShellLib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ShellPkg/Library/UefiShellLib/UefiShellLib.c b/ShellPkg/Library/UefiShellLib/UefiShellLib.c
index 25706e9bc3..c3a67c3be7 100644
--- a/ShellPkg/Library/UefiShellLib/UefiShellLib.c
+++ b/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);