From: Jiri Kosina Date: Tue, 24 Jun 2008 12:45:27 +0000 (+0200) Subject: HID: fix memory leak in hidraw_release X-Git-Tag: v2.6.27-rc1~855^2^2~7 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4db1c62c9991e62b441672db7f227e722776adc4;p=linux-2.6 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 Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index 0c6b4d4e7e..8ecd775251 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; }