]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix the BdsExpandPartitionPartialDevicePathToFull() hang issue by duplicates BlockIoD...
authorRuiyu Ni <ruiyu.ni@intel.com>
Thu, 26 Sep 2013 05:53:11 +0000 (05:53 +0000)
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 26 Sep 2013 05:53:11 +0000 (05:53 +0000)
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Chao B Zhang <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14733 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c

index 06ba0fcf79031ca499ddca2cf2e4d2942f11bcb1..29afe45f351c0d4435c84a74c8336f8fb77fa220 100644 (file)
@@ -2637,17 +2637,16 @@ BdsExpandPartitionPartialDevicePathToFull (
           TempNewDevicePath = CachedDevicePath;\r
           CachedDevicePath = BdsLibDelPartMatchInstance (CachedDevicePath, BlockIoDevicePath);\r
           FreePool(TempNewDevicePath);\r
+        }\r
 \r
-          TempNewDevicePath = CachedDevicePath;\r
-          CachedDevicePath = AppendDevicePathInstance (BlockIoDevicePath, CachedDevicePath);\r
-          if (TempNewDevicePath != NULL) {\r
-            FreePool(TempNewDevicePath);\r
-          }\r
-        } else {\r
+        if (CachedDevicePath != NULL) {\r
           TempNewDevicePath = CachedDevicePath;\r
           CachedDevicePath = AppendDevicePathInstance (BlockIoDevicePath, CachedDevicePath);\r
           FreePool(TempNewDevicePath);\r
+        } else {\r
+          CachedDevicePath = DuplicateDevicePath (BlockIoDevicePath);\r
         }\r
+\r
         //\r
         // Here limit the device path instance number to 12, which is max number for a system support 3 IDE controller\r
         // If the user try to boot many OS in different HDs or partitions, in theory, \r