projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
tools: iio: Set caller's ci_array pointer to NULL after free
[cascardo/linux.git]
/
tools
/
iio
/
iio_utils.c
diff --git
a/tools/iio/iio_utils.c
b/tools/iio/iio_utils.c
index
4bbd6e7
..
8475b83
100644
(file)
--- 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)