sparc: pci: Fix memory leak in pci_bus_slot_names()
PATCH 1/1 sparc: pci: Fix memory leak in pci_bus_slot_names()
prop is a local pointer in pci_bus_slot_names(). It is initialized by calling of_get_property() so the caller must free prop when done using it.
Signed-off-by Salah Triki <[email protected]>
--- arch/sparc/kernel/pci.c | 2 ++ 1 file changed, 2 insertions(+)
arch/sparc/kernel/pci.c +2 -0
@@ -971,6 +971,8 @@ static void pci_bus_slot_names(struct device_node *node, struct pci_bus *bus) mask &= ~this_bit; i++; } + +kfree (prop); }static int __init of_pci_slot_init (void )
Signature · 1 line
2.34.1