diff options
Diffstat (limited to 'tools/iio/iio_utils.c')
-rw-r--r-- | tools/iio/iio_utils.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/iio/iio_utils.c b/tools/iio/iio_utils.c index f879ad7b88bc..6daf98fdde1a 100644 --- a/tools/iio/iio_utils.c +++ b/tools/iio/iio_utils.c @@ -410,8 +410,10 @@ int build_channel_array(const char *device_dir, return 0; error_cleanup_array: - for (i = count - 1; i >= 0; i--) + for (i = count - 1; i >= 0; i--) { free((*ci_array)[i].name); + free((*ci_array)[i].generic_name); + } free(*ci_array); error_close_dir: closedir(dp); |