summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGvozden Neskovic <[email protected]>2016-07-28 22:27:56 +0200
committerBrian Behlendorf <[email protected]>2016-07-29 15:34:12 -0700
commit78867a0a0a47eafbf4d02ddb12a84ef86cd7a07a (patch)
tree61a2322ee56e77a60d0cb145b65facb7a95ef075 /lib
parentb264d9b3e5b2b5b8eaeef7b34eb7b1b6caf4e4fb (diff)
libzfs_import.c: Uninitialized pointer read
In zpool_find_import_scan: Reads an uninitialized pointer or its target Coverity #150966 Found by static analysis with CoverityScan 0.8.5 Signed-off-by: Gvozden Neskovic <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #4897
Diffstat (limited to 'lib')
-rw-r--r--lib/libzfs/libzfs_import.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libzfs/libzfs_import.c b/lib/libzfs/libzfs_import.c
index 8e51f6d77..fb3525848 100644
--- a/lib/libzfs/libzfs_import.c
+++ b/lib/libzfs/libzfs_import.c
@@ -1695,6 +1695,7 @@ zpool_find_import_scan(libzfs_handle_t *hdl, kmutex_t *lock,
return (0);
error:
+ cookie = NULL;
while ((slice = avl_destroy_nodes(cache, &cookie)) != NULL) {
free(slice->rn_name);
free(slice);