aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/mon
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2008-04-14 21:27:00 +0800
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-24 21:16:32 -0700
commitd4062fcb9e6164cbbcef773f6b6602e30c4b6007 (patch)
treedce1c04c00c12df5a1c2328c75b5a35dce787fa4 /drivers/usb/mon
parent59fba744daadaaa85e07a5db96ac3618bc45a9ad (diff)
downloadkernel_samsung_crespo-d4062fcb9e6164cbbcef773f6b6602e30c4b6007.zip
kernel_samsung_crespo-d4062fcb9e6164cbbcef773f6b6602e30c4b6007.tar.gz
kernel_samsung_crespo-d4062fcb9e6164cbbcef773f6b6602e30c4b6007.tar.bz2
USB: Fix memory leak in mon_stat_release
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>
Diffstat (limited to 'drivers/usb/mon')
-rw-r--r--drivers/usb/mon/mon_stat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/mon/mon_stat.c b/drivers/usb/mon/mon_stat.c
index f6d1491..c7a595c 100644
--- 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;
}