Skip to content

Commit

Permalink
HID: fix memleaking of collection
Browse files Browse the repository at this point in the history
hid_free_device() doesn't free device->collection (but it does
free device->rdesc and device itself). This imposes memory leak.
Fix it.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Jiri Kosina committed Jan 25, 2007
1 parent 99abfea commit 767fe78
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/hid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ void hid_free_device(struct hid_device *device)
}

kfree(device->rdesc);
kfree(device->collection);
kfree(device);
}
EXPORT_SYMBOL_GPL(hid_free_device);
Expand Down

0 comments on commit 767fe78

Please sign in to comment.