[PATCH 03/32] tools:iio:iio_utils: free scan_el_dir on exit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 tools/iio/iio_utils.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/iio/iio_utils.c b/tools/iio/iio_utils.c
index 6f64521..f879ad7 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);
 
-- 
2.3.6

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux