Skip to content

Commit eebad33

Browse files
ryaotonyhutter
authored andcommitted
Fix NULL pointer dereference in zdb
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 <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes openzfs#14044
1 parent f852452 commit eebad33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/zdb/zdb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2995,7 +2995,7 @@ open_objset(const char *path, void *tag, objset_t **osp)
29952995
}
29962996
sa_os = *osp;
29972997

2998-
return (0);
2998+
return (err);
29992999
}
30003000

30013001
static void

0 commit comments

Comments
 (0)