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>
This commit is contained in:
Hartmut Knaack 2015-05-31 14:39:43 +02:00 committed by Jonathan Cameron
parent d3ccfc41f9
commit 66dd08fde0
1 changed files with 1 additions and 0 deletions

View File

@ -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);