Re: [PATCH 01/20] coresight: Fix memory leak in coresight_register

2018-06-06 Thread Suzuki K Poulose
On 06/06/2018 07:44 AM, Arvind Yadav wrote: Hi Suzuki, On Wednesday 06 June 2018 03:13 AM, Suzuki K Poulose wrote: commit 6403587a930c ("coresight: use put_device() instead of kfree()") introduced a memory leak where, if we fail to register the device for coresight_device, we don't free the "c

Re: [PATCH 01/20] coresight: Fix memory leak in coresight_register

2018-06-05 Thread Arvind Yadav
Hi Suzuki, On Wednesday 06 June 2018 03:13 AM, Suzuki K Poulose wrote: commit 6403587a930c ("coresight: use put_device() instead of kfree()") introduced a memory leak where, if we fail to register the device for coresight_device, we don't free the "coresight_device" object, which was allocated

[PATCH 01/20] coresight: Fix memory leak in coresight_register

2018-06-05 Thread Suzuki K Poulose
commit 6403587a930c ("coresight: use put_device() instead of kfree()") introduced a memory leak where, if we fail to register the device for coresight_device, we don't free the "coresight_device" object, which was allocated via kzalloc(). Fix this by jumping to the appropriate error path. Fixes: c