Re: [PATCH 1/2] iio: core: use kfree_const in iio_free_chan_devattr_list() to free names

2021-02-22 Thread Alexandru Ardelean
On Mon, Feb 22, 2021 at 6:06 PM Jonathan Cameron wrote: > > On Fri, 19 Feb 2021 10:58:25 +0200 > Alexandru Ardelean wrote: > > > When the buffer attributes were wrapped in iio_dev_attr types, I forgot to > > duplicate the names, so that when iio_free_chan_devattr_list() gets called > > on

Re: [PATCH 1/2] iio: core: use kfree_const in iio_free_chan_devattr_list() to free names

2021-02-22 Thread Jonathan Cameron
On Fri, 19 Feb 2021 10:58:25 +0200 Alexandru Ardelean wrote: > When the buffer attributes were wrapped in iio_dev_attr types, I forgot to > duplicate the names, so that when iio_free_chan_devattr_list() gets called > on cleanup, these get free'd. > I stumbled over this while accidentally

[PATCH 1/2] iio: core: use kfree_const in iio_free_chan_devattr_list() to free names

2021-02-19 Thread Alexandru Ardelean
When the buffer attributes were wrapped in iio_dev_attr types, I forgot to duplicate the names, so that when iio_free_chan_devattr_list() gets called on cleanup, these get free'd. I stumbled over this while accidentally breaking a driver doing iio_device_register(), and then the issue appeared.