Skip to content

Commit

Permalink
Fix NULL pointer dereference in zdb
Browse files Browse the repository at this point in the history
Clang's static analyzer complained that we dereference a NULL pointer in
dump_path() if we return 0 when there is an error.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Richard Yao <[email protected]>
Closes openzfs#14044
  • Loading branch information
ryao authored and tonyhutter committed Nov 22, 2022
1 parent f852452 commit eebad33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/zdb/zdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2995,7 +2995,7 @@ open_objset(const char *path, void *tag, objset_t **osp)
}
sa_os = *osp;

return (0);
return (err);
}

static void
Expand Down

0 comments on commit eebad33

Please sign in to comment.