diff options
author | Jeff Westfahl <jeff.westfahl@ni.com> | 2017-05-13 04:41:40 +0800 |
---|---|---|
committer | Ruiyu Ni <ruiyu.ni@intel.com> | 2017-06-02 15:18:04 +0800 |
commit | 121e15a578629fefa3a3f132756c57fdc0705945 (patch) | |
tree | 4fbfb3992540bef4ea61971da7889e658dc04332 | |
parent | 14bb6567c79b91a9767469ee648c4f251af70de0 (diff) | |
download | edk2-121e15a578629fefa3a3f132756c57fdc0705945.tar.gz |
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)
-rw-r--r-- | ShellPkg/Library/UefiShellLib/UefiShellLib.c | 2 |
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);
|