Skip to content

Commit

Permalink
HID: fix memory leak in hidraw_release
Browse files Browse the repository at this point in the history
hidraw_release() forgot to free the linked list structure, causing memory
leak.

Reported-by: Juan Marcos Diez Esteban <juan_m_diez@yahoo.es>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Jiri Kosina committed Jul 23, 2008
1 parent f472f80 commit 4db1c62
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/hid/hidraw.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ static int hidraw_release(struct inode * inode, struct file * file)
kfree(list->hidraw);
}

kfree(list);

return 0;
}

Expand Down

0 comments on commit 4db1c62

Please sign in to comment.