]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.c
ShellPkg: remove high bit to change a EFI_STATUS to a SHELL_STATUS
[mirror_edk2.git] / ShellPkg / Library / UefiShellLevel2CommandsLib / UefiShellLevel2CommandsLib.c
index b153d2fe452842df0e2412328eb4719cfeee8403..52aaff021f88c03f6025682cea0f5aab52457e60 100644 (file)
@@ -163,8 +163,8 @@ ShellLevel2CommandsLibDestructor (
   @param[in] Path         The unknown Path Value\r
 \r
   @retval NULL            A memory allocation failed\r
-  @retval NULL            a fully qualified path could not be discovered.\r
-  @retval other           pointer to a fuly qualified path.\r
+  @retval NULL            A fully qualified path could not be discovered.\r
+  @retval other           An allocated pointer to a fuly qualified path.\r
 **/\r
 CHAR16*\r
 EFIAPI\r
@@ -194,6 +194,10 @@ GetFullyQualifiedPath(
 \r
   PathCleanUpDirectories(PathToReturn);\r
 \r
+  if (PathToReturn == NULL) {\r
+    return NULL;\r
+  }\r
+\r
   while (PathToReturn[StrLen(PathToReturn)-1] == L'*') {\r
     PathToReturn[StrLen(PathToReturn)-1] = CHAR_NULL;\r
   }\r