Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
channel: Don't lookup attributes in special case of reading all attrs
In the case where we want to read all attributes of a channel, we need to call iio_channel_attr_read() with the 'attr' argument set to NULL. So we skip searching for an attribute in this case. This was found when calling iio_channel_attr_read_all() which was causing a segmentation fault: 0: __strcmp_avx2 () at ../sysdeps/x86_64/multiarch/strcmp-avx2.S:116 1: iio_channel_do_find_attr (chn=0x555555ddf950, name=0x0) 2: iio_channel_find_attr (chn=0x555555ddf950, name=0x0) 3: iio_channel_attr_read () 4: iio_channel_attr_read_all () Signed-off-by: Dan <[email protected]>
- Loading branch information