[SCSI] iscsi_boot_sysfs: Fix a memory leak in iscsi_boot_destroy_kset()
authorEthan Zhao <ethan.kernel@gmail.com>
Fri, 7 Feb 2014 06:41:41 +0000 (00:41 -0600)
committerJames Bottomley <JBottomley@Parallels.com>
Sat, 15 Mar 2014 17:19:19 +0000 (10:19 -0700)
Load and unload iscsi_ibft module will cause kernel memory leak, fix it
in scsi/iscsi_boot_sysfs.c iscsi_boot_destroy_kset().

Signed-off-by: Ethan Zhao <ethan.kernel@gmail.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/iscsi_boot_sysfs.c

index 14c1c8f6a95e502f20f9eaea318fea5161ad62f8..680bf6f0ce767143cdaf40528333f0cf8c4d945c 100644 (file)
@@ -490,5 +490,6 @@ void iscsi_boot_destroy_kset(struct iscsi_boot_kset *boot_kset)
                iscsi_boot_remove_kobj(boot_kobj);
 
        kset_unregister(boot_kset->kset);
+       kfree(boot_kset);
 }
 EXPORT_SYMBOL_GPL(iscsi_boot_destroy_kset);