]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg/UefiShellLib: Check correct variable for NULL
authorJeff Westfahl <jeff.westfahl@ni.com>
Fri, 12 May 2017 20:41:40 +0000 (04:41 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Fri, 2 Jun 2017 07:04:12 +0000 (15:04 +0800)
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>
ShellPkg/Library/UefiShellLib/UefiShellLib.c

index 25706e9bc32822f06b6b397205a01f20c082230e..c3a67c3be7685379c7a39d4f7120d0f9db7264cb 100644 (file)
@@ -702,7 +702,7 @@ ShellOpenFileByName(
       // Create the directory to create the file in\r
       //\r
       FileNameCopy = AllocateCopyPool (StrSize (FileName), FileName);\r
-      if (FileName == NULL) {\r
+      if (FileNameCopy == NULL) {\r
         return (EFI_OUT_OF_RESOURCES);\r
       }\r
       PathCleanUpDirectories (FileNameCopy);\r