diff options
author | mdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-05-07 22:44:54 +0000 |
---|---|---|
committer | mdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-05-07 22:44:54 +0000 |
commit | 8063b47b1ca5aae1788a30568c2996ca81748010 (patch) | |
tree | 727452e49b3ffb6bcdf7d039df386ba2e3d5bfd9 /MdeModulePkg | |
parent | 208a8330d0029d4025f6f27f182d627bd9d7b38b (diff) | |
download | edk2-platforms-8063b47b1ca5aae1788a30568c2996ca81748010.tar.xz |
Fix bug in PciHostBridgeEnumerator().
A linked list is created for the list of PCI Root Bridges in the platform. This list is then traversed to enumerate each PCI Root Bridge. After enumeration, the RootBridgeDev is destroyed, but it was not removed from the linked list before it was destroyed. This left the linked list of PCI Root Bridges in a bad state, specially if memory is cleared on frees, or the freed buffer was reallocated.
The fix is to remove the node from the linked list before the RootBridgeDev is destroyed.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10463 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c index 548b8a2298..8397a40582 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c @@ -1241,7 +1241,7 @@ PciHostBridgeEnumerator ( );
FreePool (Configuration);
- Link = GetNextNode (&RootBridgeList, Link);
+ Link = RemoveEntryList (Link);
DestroyRootBridge (RootBridgeDev);
}
|