On 07/05/15 08:43, Daniel Baluta wrote:
> On Thu, May 7, 2015 at 1:00 AM, Fabio Estevam wrote:
>> On Wed, May 6, 2015 at 6:48 PM, Alexey Khoroshilov
>> wrote:
>>> If prox_parse_report() fails, memory allocated for channels is not
>>> deallocated, since it is still in local variable channels
>>> w
On Thu, May 7, 2015 at 1:00 AM, Fabio Estevam wrote:
> On Wed, May 6, 2015 at 6:48 PM, Alexey Khoroshilov
> wrote:
>> If prox_parse_report() fails, memory allocated for channels is not
>> deallocated, since it is still in local variable channels
>> while kfree() is called with indio_dev->channels
On 07.05.2015 01:32, Fabio Estevam wrote:
> On Wed, May 6, 2015 at 7:14 PM, Alexey Khoroshilov
> wrote:
>
>> Not exactly. Other calls are after
>> indio_dev->channels = channels;
>> So,
>> error_free_dev_mem:
>> kfree(indio_dev->channels);
>> works for them well.
>
> indio_dev is alloc
On Wed, May 6, 2015 at 7:14 PM, Alexey Khoroshilov
wrote:
> Not exactly. Other calls are after
> indio_dev->channels = channels;
> So,
> error_free_dev_mem:
> kfree(indio_dev->channels);
> works for them well.
indio_dev is allocated using devm_ , so you don't need to free it.
Your pat
On 07.05.2015 01:00, Fabio Estevam wrote:
> On Wed, May 6, 2015 at 6:48 PM, Alexey Khoroshilov
> wrote:
>> If prox_parse_report() fails, memory allocated for channels is not
>> deallocated, since it is still in local variable channels
>> while kfree() is called with indio_dev->channels.
>>
>> Foun
On Wed, May 6, 2015 at 6:48 PM, Alexey Khoroshilov
wrote:
> If prox_parse_report() fails, memory allocated for channels is not
> deallocated, since it is still in local variable channels
> while kfree() is called with indio_dev->channels.
>
> Found by Linux Driver Verification project (linuxtestin
If prox_parse_report() fails, memory allocated for channels is not
deallocated, since it is still in local variable channels
while kfree() is called with indio_dev->channels.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov
---
drivers/iio/light/h
7 matches
Mail list logo