summaryrefslogtreecommitdiff
path: root/tools/iio
diff options
context:
space:
mode:
authorHartmut Knaack <knaack.h@gmx.de>2015-05-31 15:39:43 +0300
committerJonathan Cameron <jic23@kernel.org>2015-05-31 19:19:12 +0300
commit66dd08fde06e5ad6f0f86c7a780d60973e9d9cf0 (patch)
tree5ed7619e6e51be344481a6794f26ea59520aac83 /tools/iio
parentd3ccfc41f971105404694e8478b5e60625e46967 (diff)
downloadlinux-66dd08fde06e5ad6f0f86c7a780d60973e9d9cf0.tar.xz
tools:iio:iio_utils: free scan_el_dir on exit
In the error path, the string scan_el_dir got freed, while it was missing when build_channel_array() finished without errors. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'tools/iio')
-rw-r--r--tools/iio/iio_utils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/iio/iio_utils.c b/tools/iio/iio_utils.c
index 6f6452167b67..f879ad7b88bc 100644
--- a/tools/iio/iio_utils.c
+++ b/tools/iio/iio_utils.c
@@ -403,6 +403,7 @@ int build_channel_array(const char *device_dir,
}
closedir(dp);
+ free(scan_el_dir);
/* reorder so that the array is in index order */
bsort_channel_array_by_index(ci_array, *counter);