diff options
author | Alex Chiang <achiang@hp.com> | 2008-12-01 20:17:21 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-12-09 17:36:03 -0500 |
commit | 3b5dd45e947ecd21491e1658fba7bb4bc4a54995 (patch) | |
tree | fc4180b27c193855a3324a11e29a5d0cd2aae405 /drivers/pci | |
parent | 437f2f91d6597c67662f847d9ed4c99cb3c440cd (diff) |
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 <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/slot.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c index 4dd1c3e157ae..5a8ccb4f604d 100644 --- a/drivers/pci/slot.c +++ b/drivers/pci/slot.c | |||
@@ -253,6 +253,7 @@ placeholder: | |||
253 | __func__, pci_domain_nr(parent), parent->number, slot_nr); | 253 | __func__, pci_domain_nr(parent), parent->number, slot_nr); |
254 | 254 | ||
255 | out: | 255 | out: |
256 | kfree(slot_name); | ||
256 | up_write(&pci_bus_sem); | 257 | up_write(&pci_bus_sem); |
257 | return slot; | 258 | return slot; |
258 | err: | 259 | err: |