[Skiboot] [PATCH] core/pci: Fix mem-leak on fast-reboot
Matt Brown
matthew.brown.dev at gmail.com
Thu Jul 20 16:52:28 AEST 2017
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 at gmail.com>
---
core/pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/core/pci.c b/core/pci.c
index cc18db1..c1084b5 100644
--- a/core/pci.c
+++ b/core/pci.c
@@ -1640,6 +1640,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);
}
}
--
2.9.3
More information about the Skiboot
mailing list