Skip to content
Commit 6b20f406 authored by Joo Aun Saw's avatar Joo Aun Saw Committed by Jonathan Cameron
Browse files

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: default avatarJoo Aun Saw <jasaw@dius.com.au>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent bdb25b0a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment