Skip to content

Commit

Permalink
libzfs_import.c: Uninitialized pointer read
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ironMann authored and behlendorf committed Jul 29, 2016
1 parent b264d9b commit 78867a0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/libzfs/libzfs_import.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 78867a0

Please sign in to comment.