From: Johannes Weiner Date: Tue, 10 Mar 2009 21:43:56 +0000 (+0100) Subject: HID: fix incorrect free in hiddev X-Git-Tag: v2.6.29~17^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48e7a3c95c9f98c2cb6f894820e3cc2d0448e92f;p=pandora-kernel.git HID: fix incorrect free in hiddev If hiddev_open() fails, it wrongly frees the shared hiddev structure kept in hiddev_table instead of the hiddev_list structure allocated for the opened file descriptor. Existing references to this structure will then accessed free memory. This was introduced by 079034073 "HID: hiddev cleanup -- handle all error conditions properly". Signed-off-by: Johannes Weiner Cc: Oliver Neukum Cc: Jiri Kosina Signed-off-by: Andrew Morton Signed-off-by: Jiri Kosina --- Reading git-diff-tree failed