]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
ShellPkg Build failure of AllocateZeroPool usage. This patch updates AllocateZeroPool...
[mirror_edk2.git] / ShellPkg / Library / UefiShellCommandLib / UefiShellCommandLib.c
index 3829ba1f8c779f11407e7295c464a8a6fe070e79..74d4d9e41cf848d8a2ba9021619febb2ffed80b3 100644 (file)
@@ -1165,7 +1165,7 @@ ShellCommandAddMapItemAndUpdatePath(
     Status = EFI_OUT_OF_RESOURCES;\r
   } else {\r
     MapListNode->Flags = Flags;\r
-    MapListNode->MapName = AllocateZeroPool(StrSize(Name), Name);\r
+    MapListNode->MapName = AllocateCopyPool(StrSize(Name), Name);\r
     MapListNode->DevicePath = DuplicateDevicePath(DevicePath);\r
     if ((MapListNode->MapName == NULL) || (MapListNode->DevicePath == NULL)){\r
       Status = EFI_OUT_OF_RESOURCES;\r