aboutsummaryrefslogtreecommitdiff
path: root/core/pci.c
diff options
context:
space:
mode:
authorMatt Brown <matthew.brown.dev@gmail.com>2017-07-20 16:52:28 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-07-20 20:21:31 +1000
commit57f2e785155d9b3ea40a845987579131c04302ff (patch)
tree7264075313367df626c327c3fe2f1a0da70c3fd1 /core/pci.c
parent0b134f57306b8f1e0f2d9eedd0baf9d73488f4be (diff)
downloadskiboot-57f2e785155d9b3ea40a845987579131c04302ff.zip
skiboot-57f2e785155d9b3ea40a845987579131c04302ff.tar.gz
skiboot-57f2e785155d9b3ea40a845987579131c04302ff.tar.bz2
core/pci: Fix mem-leak on fast-reboot
Fast-reboot has a memory leak which causes the system to crash after about 250 fast-reboots. The patch fixes the memory leak. The cause of the leak was the pci_device's being freed, without freeing the pci_slot within it. Signed-off-by: Matt Brown <matthew.brown.dev@gmail.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/pci.c')
-rw-r--r--core/pci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/pci.c b/core/pci.c
index 49e5bed..4296180 100644
--- a/core/pci.c
+++ b/core/pci.c
@@ -1641,6 +1641,7 @@ static void __pci_reset(struct list_head *list)
while ((pd = list_pop(list, struct pci_device, link)) != NULL) {
__pci_reset(&pd->children);
dt_free(pd->dn);
+ free(pd->slot);
free(pd);
}
}