Fix coverity defects: CID 147551, 147552

CID 147551: Type:dereference null return value
CID 147552: Type:dereference null return value

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: cao.xuewen <cao.xuewen@zte.com.cn>
Closes #5279
This commit is contained in:
cao
2016-10-21 02:49:50 +08:00
committed by Brian Behlendorf
parent 5a6765cf8c
commit 9d01680430
2 changed files with 9 additions and 2 deletions
+4
View File
@@ -2773,6 +2773,10 @@ zfs_ioc_inherit_prop(zfs_cmd_t *zc)
}
pair = nvlist_next_nvpair(dummy, NULL);
if (pair == NULL) {
nvlist_free(dummy);
return (SET_ERROR(EINVAL));
}
err = zfs_prop_set_special(zc->zc_name, source, pair);
nvlist_free(dummy);
if (err != -1)