[lkml]   [2018]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectHID: 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-> list on ish_probe().
But there is no deallocation of this memory in ish_remove() and in
error path.
So current intel-ish-ipc provides 88 KB memory leak for each probe/release.

I have two ideas 1) to replace kzalloc allocation by devm_kzalloc,
or 2) release memory stored at &dev-> list (and
may be at
&dev-> in all driver exits.

But I do not know which way is preferable for this case.

Found by Linux Driver Verification project (

Anton Vasilyev
Linux Verification Center, ISPRAS

 \ /
  Last update: 2018-07-23 19:57    [W:0.361 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site