Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5fd39c35a016150e93b68c472a04b2d4b5574a2b
Commit:     5fd39c35a016150e93b68c472a04b2d4b5574a2b
Parent:     31be7586d1122538747519d786408f142f59dd46
Author:     Linas Vepstas <[EMAIL PROTECTED]>
AuthorDate: Fri Apr 13 15:34:10 2007 -0700
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Wed May 2 19:02:39 2007 -0700

    PCI: rpaphp: Fix a memleak; slot->location string was never freed
    
    Fix a memleak; the slot->location string was never freed.
    Fix some whitespace and overlong-line probelms while we're here.
    
    Signed-off-by: Linas Vepstas <[EMAIL PROTECTED]>
    Cc: John Rose <[EMAIL PROTECTED]>
    Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/pci/hotplug/rpaphp_slot.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/pci/hotplug/rpaphp_slot.c 
b/drivers/pci/hotplug/rpaphp_slot.c
index dd1e275..865b0b7 100644
--- a/drivers/pci/hotplug/rpaphp_slot.c
+++ b/drivers/pci/hotplug/rpaphp_slot.c
@@ -56,7 +56,6 @@ static struct hotplug_slot_attribute php_attr_location = {
 static void rpaphp_release_slot(struct hotplug_slot *hotplug_slot)
 {
        struct slot *slot = (struct slot *) hotplug_slot->private;
-
        dealloc_slot_struct(slot);
 }
 
@@ -65,12 +64,12 @@ void dealloc_slot_struct(struct slot *slot)
        kfree(slot->hotplug_slot->info);
        kfree(slot->hotplug_slot->name);
        kfree(slot->hotplug_slot);
+       kfree(slot->location);
        kfree(slot);
-       return;
 }
 
-struct slot *alloc_slot_struct(struct device_node *dn, int drc_index, char 
*drc_name,
-                 int power_domain)
+struct slot *alloc_slot_struct(struct device_node *dn,
+                       int drc_index, char *drc_name, int power_domain)
 {
        struct slot *slot;
        
@@ -115,7 +114,7 @@ error_nomem:
 
 static int is_registered(struct slot *slot)
 {
-       struct slot             *tmp_slot;
+       struct slot *tmp_slot;
 
        list_for_each_entry(tmp_slot, &rpaphp_slot_head, rpaphp_slot_list) {
                if (!strcmp(tmp_slot->name, slot->name))
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to