From 57f2e785155d9b3ea40a845987579131c04302ff Mon Sep 17 00:00:00 2001 From: Matt Brown Date: Thu, 20 Jul 2017 16:52:28 +1000 Subject: [PATCH] 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 Reviewed-by: Andrew Donnellan Signed-off-by: Stewart Smith --- core/pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/pci.c b/core/pci.c index 49e5bed771b0..4296180ad111 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); } }