Re: [PATCH] iio: hid-sensors: Fix memory leak on failure path in hid_prox_probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 6, 2015 at 7:14 PM, Alexey Khoroshilov
<khoroshilov@xxxxxxxxx> 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 patch is not correct because you only  kfree(channels) in the
prox_parse_report() error case, but you missed the other subsequent
functions.
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux