diff options
Diffstat (limited to 'tools/iio')
-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: | |||
526 | free((*ci_array)[i].generic_name); | 526 | free((*ci_array)[i].generic_name); |
527 | } | 527 | } |
528 | free(*ci_array); | 528 | free(*ci_array); |
529 | *ci_array = NULL; | ||
530 | *counter = 0; | ||
529 | error_close_dir: | 531 | error_close_dir: |
530 | if (dp) | 532 | if (dp) |
531 | if (closedir(dp) == -1) | 533 | if (closedir(dp) == -1) |