HID: fix memleaking of collection
authorJiri Kosina <jkosina@suse.cz>
Wed, 24 Jan 2007 22:05:07 +0000 (23:05 +0100)
committerJiri Kosina <jkosina@suse.cz>
Thu, 25 Jan 2007 17:31:21 +0000 (18:31 +0100)
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>
drivers/hid/hid-core.c

index b8cf50fcd64d358e2dadfbb5935bde979886506b..49f18f5b2514adbae5b545df07094771c9bb1f40 100644 (file)
@@ -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);