From 4db1c62c9991e62b441672db7f227e722776adc4 Mon Sep 17 00:00:00 2001
From: Jiri Kosina
Date: Tue, 24 Jun 2008 14:45:27 +0200
Subject: [PATCH] HID: fix memory leak in hidraw_release

[ Upstream commit 4db1c62c9991e62b441672db7f227e722776adc4 ]

hidraw_release() forgot to free the linked list structure, causing memory
leak.

Reported-by: Juan Marcos Diez Esteban
Signed-off-by: Jiri Kosina
CC: Oliver Pinter

diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c
index 0c6b4d4..8ecd775 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;
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/