diff options
Diffstat (limited to 'tools/iio/iio_utils.c')
-rw-r--r-- | tools/iio/iio_utils.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/iio/iio_utils.c b/tools/iio/iio_utils.c index 4bbd6e7959cd..8475b832ee39 100644 --- a/tools/iio/iio_utils.c +++ b/tools/iio/iio_utils.c @@ -526,6 +526,8 @@ error_cleanup_array: free((*ci_array)[i].generic_name); } free(*ci_array); + *ci_array = NULL; + *counter = 0; error_close_dir: if (dp) if (closedir(dp) == -1) |