mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-19 12:24:34 +08:00
HID: fix memory leak in hidraw_release
hidraw_release() forgot to free the linked list structure, causing memory leak. Reported-by: Juan Marcos Diez Esteban <juan_m_diez@yahoo.es> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
f472f80034
commit
4db1c62c99
@ -211,6 +211,8 @@ static int hidraw_release(struct inode * inode, struct file * file)
|
|||||||
kfree(list->hidraw);
|
kfree(list->hidraw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kfree(list);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user