HID: fix reference count leak hidraw
The hidraw subsystem has a bug that prevents the close syscall from ever reaching the low level driver, leading to a resource leak. Fix by replacing postdecrement with predecrement. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
25e61613cf
commit
b8a832b1c0
|
@ -208,7 +208,7 @@ static int hidraw_release(struct inode * inode, struct file * file)
|
|||
|
||||
list_del(&list->node);
|
||||
dev = hidraw_table[minor];
|
||||
if (!dev->open--) {
|
||||
if (!--dev->open) {
|
||||
if (list->hidraw->exist)
|
||||
dev->hid->ll_driver->close(dev->hid);
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue