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 #14044
  • Loading branch information
ryao authored and behlendorf committed Oct 18, 2022
1 parent 09453de commit aa822e4
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 @@ -3067,7 +3067,7 @@ open_objset(const char *path, const void *tag, objset_t **osp)
}
sa_os = *osp;

return (0);
return (err);
}

static void
Expand Down

0 comments on commit aa822e4

Please sign in to comment.