lkml.org 
[lkml]   [2008]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 72/83] PCI: stop leaking slot_name in pci_create_slot
2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Alex Chiang <achiang@hp.com>

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>

---
drivers/pci/slot.c | 1 +
1 file changed, 1 insertion(+)
--- 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:


\
 
 \ /
  Last update: 2008-12-11 20:47    [from the cache]
©2003-2011 Jasper Spaans