From 898dfba71965d11c350e349828ebddddb9090353 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 (cherry picked from commit 5220897839dd583e9d1f749fb4d8196ff86ccc8b) --- Core/ShellPkg/Library/UefiShellLib/UefiShellLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Core/ShellPkg') 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); -- cgit v1.2.3