linux_dsm_epyc7002/drivers/hid/intel-ish-hid
Anton Vasilyev 50fa92594a HID: intel_ish-hid: tx_buf memory leak on probe/remove
ish_dev_init() allocates 512*176 bytes memory for tx_buf and stores it at
&dev->wr_free_list_head.link list on ish_probe().
But there is no deallocation of this memory in ish_remove() and in
ish_probe() error path.
So current intel-ish-ipc provides 88 KB memory leak for each
probe/release.

The patch replaces kzalloc allocation by devm_kzalloc and removes
ishtp_device *dev deallocation by kfree.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-08-02 13:27:54 +02:00
..
ipc HID: intel_ish-hid: tx_buf memory leak on probe/remove 2018-08-02 13:27:54 +02:00
ishtp HID: intel-ish-hid: use put_device() instead of kfree() 2018-04-26 14:36:43 +02:00
ishtp-hid-client.c treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
ishtp-hid.c HID: intel-ish-hid: format 32-bit integers with %X 2017-01-02 13:16:32 +01:00
ishtp-hid.h HID: intel-ish-hid: ISH HID client driver 2016-08-17 11:13:08 +02:00
Kconfig HID: intel_ish-hid: enable compile testing 2017-05-30 14:11:52 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00