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 <neskovic@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4897
This commit is contained in:
Gvozden Neskovic 2016-07-28 22:27:56 +02:00 committed by Brian Behlendorf
parent b264d9b3e5
commit 78867a0a0a
1 changed files with 1 additions and 0 deletions

View File

@ -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);