From 5220897839dd583e9d1f749fb4d8196ff86ccc8b Mon Sep 17 00:00:00 2001 From: Jeff Westfahl Date: Sat, 13 May 2017 04:41:40 +0800 Subject: ShellPkg/UefiShellLib: Check correct variable for NULL Cc: Ruiyu Ni Cc: Jaben Carsey Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Westfahl Reviewed-by: Jaben Carsey --- ShellPkg/Library/UefiShellLib/UefiShellLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ShellPkg/Library/UefiShellLib') 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); -- cgit v1.2.3