summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);