From 66dd08fde06e5ad6f0f86c7a780d60973e9d9cf0 Mon Sep 17 00:00:00 2001 From: Hartmut Knaack Date: Sun, 31 May 2015 14:39:43 +0200 Subject: 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 Signed-off-by: Jonathan Cameron --- tools/iio/iio_utils.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/iio/iio_utils.c') 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); -- cgit v1.2.3-59-g8ed1b