Commit 66dd08fd authored by Hartmut Knaack's avatar Hartmut Knaack Committed by Jonathan Cameron

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: default avatarHartmut Knaack <knaack.h@gmx.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent d3ccfc41
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment