提交 d4062fcb 编写于 作者: M Ming Lei 提交者: Greg Kroah-Hartman

USB: Fix memory leak in mon_stat_release

Fix the leak of the snap structure allocated in mon_stat_open().
Signed-off-by: NMing Lei <tom.leiming@gmail.com>
Acked-by: NPete Zaitcev <zaitcev@redhat.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 59fba744
......@@ -59,6 +59,9 @@ static ssize_t mon_stat_read(struct file *file, char __user *buf,
static int mon_stat_release(struct inode *inode, struct file *file)
{
struct snap *sp = file->private_data;
file->private_data = NULL;
kfree(sp);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册