tools: iio: Set caller's ci_array pointer to NULL after free
On error, caller's ci_array is freed and set to NULL to avoid potential double free if some other user of this code is not sufficiently careful. Counter is reset to zero for consistency. Signed-off-by: NJoo Aun Saw <jasaw@dius.com.au> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
Showing
想要评论请 注册 或 登录