summaryrefslogtreecommitdiff
path: root/drivers/hid/hidraw.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2008-06-24 16:45:27 +0400
committerJiri Kosina <jkosina@suse.cz>2008-07-23 17:25:21 +0400
commit4db1c62c9991e62b441672db7f227e722776adc4 (patch)
treefba1946ddedc94c81423fe07cf1d8061794d55fa /drivers/hid/hidraw.c
parentf472f80034ae5d0be7d7196c7e65d0ca8890afb4 (diff)
downloadlinux-4db1c62c9991e62b441672db7f227e722776adc4.tar.xz
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>
Diffstat (limited to 'drivers/hid/hidraw.c')
-rw-r--r--drivers/hid/hidraw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c
index 0c6b4d4e7e27..8ecd77525103 100644
--- a/drivers/hid/hidraw.c
+++ b/drivers/hid/hidraw.c
@@ -211,6 +211,8 @@ static int hidraw_release(struct inode * inode, struct file * file)
kfree(list->hidraw);
}
+ kfree(list);
+
return 0;
}