linux/drivers/hid/intel-ish-hid/ipc
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
..
hw-ish-regs.h HID: intel-ish-hid: ipc: check FW status to distinguish ISH resume paths 2017-02-08 12:11:57 +09:00
hw-ish.h HID: intel-ish-hid: Enable Cannon Lake and Coffee Lake laptop/desktop 2018-01-23 15:40:57 +01:00
ipc.c HID: intel_ish-hid: tx_buf memory leak on probe/remove 2018-08-02 13:27:54 +02:00
pci-ish.c HID: intel_ish-hid: tx_buf memory leak on probe/remove 2018-08-02 13:27:54 +02:00