diff options
author | Hartmut Knaack <knaack.h@gmx.de> | 2015-05-31 14:39:43 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-05-31 17:19:12 +0100 |
commit | 66dd08fde06e5ad6f0f86c7a780d60973e9d9cf0 (patch) | |
tree | 5ed7619e6e51be344481a6794f26ea59520aac83 /tools/iio | |
parent | d3ccfc41f971105404694e8478b5e60625e46967 (diff) | |
download | linux-66dd08fde06e5ad6f0f86c7a780d60973e9d9cf0.tar.gz linux-66dd08fde06e5ad6f0f86c7a780d60973e9d9cf0.tar.bz2 linux-66dd08fde06e5ad6f0f86c7a780d60973e9d9cf0.zip |
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.c | 1 |
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); |