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:18:04 +0800
commit121e15a578629fefa3a3f132756c57fdc0705945 (patch)
tree4fbfb3992540bef4ea61971da7889e658dc04332 /ShellPkg
parent14bb6567c79b91a9767469ee648c4f251af70de0 (diff)
downloadedk2-121e15a578629fefa3a3f132756c57fdc0705945.tar.gz
edk2-121e15a578629fefa3a3f132756c57fdc0705945.tar.bz2
edk2-121e15a578629fefa3a3f132756c57fdc0705945.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> (cherry picked from commit 5220897839dd583e9d1f749fb4d8196ff86ccc8b)
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 55e8a67ac4..0f37886956 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);