diff options
author | vanjeff <vanjeff> | 2013-09-27 02:50:36 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-09-27 02:50:36 +0000 |
commit | 4165e2fa236a197efa434a1f61525355c2c301eb (patch) | |
tree | e0f71a691b4acc3a52825f36240d7af8d3637440 | |
parent | ff19a31583f2f6e0c67b6653c38c7d95bad78c21 (diff) | |
download | edk2-4165e2fa236a197efa434a1f61525355c2c301eb.tar.gz |
Sync patch r14733 from main trunk.
Fix the BdsExpandPartitionPartialDevicePathToFull() hang issue by duplicates BlockIoDevicePath when the CachedDevicePath returned from BdsLibDelPartMatchInstance() is NULL.
git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2010.SR1@14734 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c index 41372594de..525ef86b73 100644 --- a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c +++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c @@ -1042,17 +1042,16 @@ BdsExpandPartitionPartialDevicePathToFull ( TempNewDevicePath = CachedDevicePath;
CachedDevicePath = BdsLibDelPartMatchInstance (CachedDevicePath, BlockIoDevicePath);
FreePool(TempNewDevicePath);
+ }
- TempNewDevicePath = CachedDevicePath;
- CachedDevicePath = AppendDevicePathInstance (BlockIoDevicePath, CachedDevicePath);
- if (TempNewDevicePath != NULL) {
- FreePool(TempNewDevicePath);
- }
- } else {
+ if (CachedDevicePath != NULL) {
TempNewDevicePath = CachedDevicePath;
CachedDevicePath = AppendDevicePathInstance (BlockIoDevicePath, CachedDevicePath);
FreePool(TempNewDevicePath);
+ } else {
+ CachedDevicePath = DuplicateDevicePath (BlockIoDevicePath);
}
+
//
// Here limit the device path instance number to 12, which is max number for a system support 3 IDE controller
// If the user try to boot many OS in different HDs or partitions, in theory,
|