提交 767fe787 编写于 作者: J Jiri Kosina

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: NJiri Kosina <jkosina@suse.cz>
上级 99abfeaf
...@@ -543,6 +543,7 @@ void hid_free_device(struct hid_device *device) ...@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册