Re: [PATCH v2] iio: core: use kstrdup_const/kfree_const for buffer attributes

2021-02-27 Thread Jonathan Cameron
On Tue, 23 Feb 2021 09:29:26 +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 v2] iio: core: use kstrdup_const/kfree_const for buffer attributes

2021-02-22 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.