From 78867a0a0a47eafbf4d02ddb12a84ef86cd7a07a Mon Sep 17 00:00:00 2001 From: Gvozden Neskovic Date: Thu, 28 Jul 2016 22:27:56 +0200 Subject: [PATCH] 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 Signed-off-by: Brian Behlendorf Closes #4897 --- lib/libzfs/libzfs_import.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libzfs/libzfs_import.c b/lib/libzfs/libzfs_import.c index 8e51f6d77feb..fb3525848c94 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);