diff options
author | cao <[email protected]> | 2016-11-09 08:41:31 +0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-11-08 16:41:31 -0800 |
commit | acc6d0e223e5dcff183a5dd52019cea1dabd981b (patch) | |
tree | bff725fe75de4f8aa11c98e6c2e9eec2039ed6a0 | |
parent | 70df4c21c0da3baacb6601d924dd1fb2b3cad1b3 (diff) |
Fix coverity defects: CID 147629
CID 147629: Type:Dereference before null check
Reviewed-by: Brian Behlendorf <[email protected]
Signed-off-by: <cao.xuewen [email protected]>
Closes #5376
-rw-r--r-- | lib/libuutil/uu_dprintf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libuutil/uu_dprintf.c b/lib/libuutil/uu_dprintf.c index 5d5fb84a8..d51fa81e8 100644 --- a/lib/libuutil/uu_dprintf.c +++ b/lib/libuutil/uu_dprintf.c @@ -68,7 +68,8 @@ uu_dprintf_create(const char *name, uu_dprintf_severity_t severity, { uu_dprintf_t *D; - if (uu_check_name(name, UU_NAME_DOMAIN) == -1) { + if (name != NULL && + uu_check_name(name, UU_NAME_DOMAIN) == -1) { uu_set_error(UU_ERROR_INVALID_ARGUMENT); return (NULL); } |