Fix coverity defects: CID 147629

CID 147629: Type:Dereference before null check

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov
Signed-off-by: <cao.xuewen cao.xuewen@zte.com.cn>
Closes #5376
This commit is contained in:
cao 2016-11-09 08:41:31 +08:00 committed by Brian Behlendorf
parent 70df4c21c0
commit acc6d0e223
1 changed files with 2 additions and 1 deletions

View File

@ -68,7 +68,8 @@ uu_dprintf_create(const char *name, uu_dprintf_severity_t severity,
{ {
uu_dprintf_t *D; 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); uu_set_error(UU_ERROR_INVALID_ARGUMENT);
return (NULL); return (NULL);
} }