aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorAlex Chiang <achiang@hp.com>2008-12-01 18:17:21 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2008-12-13 15:29:32 -0800
commitdeb068ac802e7f3434cbd52565dc089dc154d868 (patch)
tree4be336cf299d386aa58e26e90a11f9c3675e5ccc /drivers/pci
parent053abaffaa8e536b489ff66b9882a9a60acf3025 (diff)
PCI: stop leaking 'slot_name' in pci_create_slot
commit 3b5dd45e947ecd21491e1658fba7bb4bc4a54995 upstream. 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. Signed-off-by: Alex Chiang <achiang@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/slot.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c
index b703b097ce1..e423fd9e8f3 100644
--- a/drivers/pci/slot.c
+++ b/drivers/pci/slot.c
@@ -243,6 +243,7 @@ placeholder:
__func__, pci_domain_nr(parent), parent->number, slot_nr);
out:
+ kfree(slot_name);
up_write(&pci_bus_sem);
return slot;
err: