From: Jiri Kosina Date: Wed, 24 Jan 2007 22:05:07 +0000 (+0100) Subject: HID: fix memleaking of collection X-Git-Tag: v2.6.20-rc7~1^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=767fe7877c2928b5633992ee60a49ad4516dc2af;p=linux-2.6 HID: fix memleaking of collection 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 --- diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index b8cf50fcd6..49f18f5b25 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -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);