Skip to content
Commit 48e7a3c9 authored by Johannes Weiner's avatar Johannes Weiner Committed by Jiri Kosina
Browse files

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 07903407 "HID: hiddev cleanup -- handle all
error conditions properly".

Signed-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent d2f8d7ee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment