mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
class: Free the class private data in class_release
Fix a memory leak by freeing the memory allocated in __class_register for the class private data. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Artem Bityutskiy <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
7c0ff870d1
commit
18d19c9645
1 changed files with 2 additions and 0 deletions
|
|
@ -59,6 +59,8 @@ static void class_release(struct kobject *kobj)
|
|||
else
|
||||
pr_debug("class '%s' does not have a release() function, "
|
||||
"be careful\n", class->name);
|
||||
|
||||
kfree(cp);
|
||||
}
|
||||
|
||||
static struct sysfs_ops class_sysfs_ops = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue