From: Alex Chiang Date: Tue, 2 Dec 2008 01:17:21 +0000 (-0700) Subject: PCI: stop leaking 'slot_name' in pci_create_slot X-Git-Tag: v2.6.28-rc8~11^2~1 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=3b5dd45e947ecd21491e1658fba7bb4bc4a54995;p=linux-2.6-omap-h63xx.git PCI: stop leaking 'slot_name' in pci_create_slot In pci_create_slot(), the local variable 'slot_name' is allocated by make_slot_name(), but never freed. We never use it after passing it to the kobject core, so we should free it upon function exit. Cc: stable@kernel.org Signed-off-by: Alex Chiang Signed-off-by: Jesse Barnes --- diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c index 4dd1c3e157a..5a8ccb4f604 100644 --- a/drivers/pci/slot.c +++ b/drivers/pci/slot.c @@ -253,6 +253,7 @@ placeholder: __func__, pci_domain_nr(parent), parent->number, slot_nr); out: + kfree(slot_name); up_write(&pci_bus_sem); return slot; err: