]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Application/Shell/Shell.c
ShellPkg : Cache the environment variable into memory to enhance
[mirror_edk2.git] / ShellPkg / Application / Shell / Shell.c
index bd695a45a4fea4a6aab8264062f0ca5a66895e3f..12daff91912873d57cb5d831c5eba9155303918a 100644 (file)
@@ -445,6 +445,8 @@ UefiMain (
     Status = CommandInit();\r
     ASSERT_EFI_ERROR(Status);\r
 \r
+    Status = ShellInitEnvVarList ();\r
+\r
     //\r
     // Check the command line\r
     //\r
@@ -702,6 +704,8 @@ FreeResources:
     DEBUG_CODE(ShellInfoObject.ConsoleInfo = NULL;);\r
   }\r
 \r
+  ShellFreeEnvVarList ();\r
+\r
   if (ShellCommandGetExit()) {\r
     return ((EFI_STATUS)ShellCommandGetExitCode());\r
   }\r