Index: Library/UefiShellLib/UefiShellLib.c
===================================================================
--- Library/UefiShellLib/UefiShellLib.c	(revision 15075)
+++ Library/UefiShellLib/UefiShellLib.c	(working copy)
@@ -1598,6 +1598,7 @@
       FreePool(((EFI_SHELL_FILE_INFO_NO_CONST*)Node)->Info);
       FreePool((EFI_SHELL_FILE_INFO_NO_CONST*)Node);
     }
+    SHELL_FREE_NON_NULL(*ListHead);
     return EFI_SUCCESS;
   }
 
