提交 66dd08fd 编写于 作者: H Hartmut Knaack 提交者: 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: NHartmut Knaack <knaack.h@gmx.de>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册