projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59fba74
)
USB: Fix memory leak in mon_stat_release
author
Ming Lei
<tom.leiming@gmail.com>
Mon, 14 Apr 2008 13:27:00 +0000
(21:27 +0800)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Fri, 25 Apr 2008 04:16:32 +0000
(21:16 -0700)
Fix the leak of the snap structure allocated in mon_stat_open().
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/mon/mon_stat.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/mon/mon_stat.c
b/drivers/usb/mon/mon_stat.c
index f6d1491256c4453ebfb1b06f2a908b4c29d364fd..c7a595cd648ae2b2f473390b94d0f89b0fb2214f 100644
(file)
--- a/
drivers/usb/mon/mon_stat.c
+++ b/
drivers/usb/mon/mon_stat.c
@@
-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;
}