From: Hartmut Knaack Date: Sun, 31 May 2015 12:39:43 +0000 (+0200) Subject: tools:iio:iio_utils: free scan_el_dir on exit X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=66dd08fde06e5ad6f0f86c7a780d60973e9d9cf0;p=linux-beck.git 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 --- 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);