Re: [PATCH] HID: multitouch: prevent memleak with the allocated name

2013-06-12 Thread Jiri Kosina
On Wed, 29 May 2013, Benjamin Tissoires wrote: mt_free_input_name() was never called during .remove(): hid_hw_stop() removes the hid_input items in hdev-inputs, and so the list is therefore empty after the call. In the end, we never free the special names that has been allocated during

Re: [PATCH] HID: multitouch: prevent memleak with the allocated name

2013-06-12 Thread Andy Shevchenko
On Wed, Jun 12, 2013 at 12:15 PM, Jiri Kosina jkos...@suse.cz wrote: [] If we are going down the path of using devm API, as proposed by Andy, that will require much more throgough review of interaction with input subsystem, so definitely not a late -rc regression fix material. Agree. I will

Re: [PATCH] HID: multitouch: prevent memleak with the allocated name

2013-06-01 Thread Andy Shevchenko
On Thu, May 30, 2013 at 4:28 PM, Benjamin Tissoires benjamin.tissoi...@gmail.com wrote: On Wed, May 29, 2013 at 10:12 PM, Andy Shevchenko andy.shevche...@gmail.com wrote: mt_free_input_name() was never called during .remove(): hid_hw_stop() removes the hid_input items in hdev-inputs, and so

Re: [PATCH] HID: multitouch: prevent memleak with the allocated name

2013-06-01 Thread Benjamin Tissoires
On Sat, Jun 1, 2013 at 1:33 PM, Andy Shevchenko andy.shevche...@gmail.com wrote: On Thu, May 30, 2013 at 4:28 PM, Benjamin Tissoires benjamin.tissoi...@gmail.com wrote: On Wed, May 29, 2013 at 10:12 PM, Andy Shevchenko andy.shevche...@gmail.com wrote: mt_free_input_name() was never called

Re: [PATCH] HID: multitouch: prevent memleak with the allocated name

2013-05-30 Thread Benjamin Tissoires
Hi Andy, On Wed, May 29, 2013 at 10:12 PM, Andy Shevchenko andy.shevche...@gmail.com wrote: On Wed, May 29, 2013 at 11:45 AM, Benjamin Tissoires benjamin.tissoi...@redhat.com wrote: mt_free_input_name() was never called during .remove(): hid_hw_stop() removes the hid_input items in

[PATCH] HID: multitouch: prevent memleak with the allocated name

2013-05-29 Thread Benjamin Tissoires
mt_free_input_name() was never called during .remove(): hid_hw_stop() removes the hid_input items in hdev-inputs, and so the list is therefore empty after the call. In the end, we never free the special names that has been allocated during .probe(). Restore the original name before freeing it to

[PATCH] HID: multitouch: prevent memleak with the allocated name

2013-05-29 Thread Andy Shevchenko
mt_free_input_name() was never called during .remove(): hid_hw_stop() removes the hid_input items in hdev-inputs, and so the list is therefore empty after the call. In the end, we never free the special names that has been allocated during .probe(). We switch to devm_kzalloc that manages