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 <jkosina@suse.cz>
This commit is contained in:
parent
99abfeafb5
commit
767fe7877c
1 changed files with 1 additions and 0 deletions
|
@ -543,6 +543,7 @@ void hid_free_device(struct hid_device *device)
|
||||||
}
|
}
|
||||||
|
|
||||||
kfree(device->rdesc);
|
kfree(device->rdesc);
|
||||||
|
kfree(device->collection);
|
||||||
kfree(device);
|
kfree(device);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(hid_free_device);
|
EXPORT_SYMBOL_GPL(hid_free_device);
|
||||||
|
|
Loading…
Reference in a new issue