summaryrefslogtreecommitdiffstats
path: root/module/zfs/zfs_ioctl.c
diff options
context:
space:
mode:
authorcao <[email protected]>2016-10-21 02:49:50 +0800
committerBrian Behlendorf <[email protected]>2016-10-20 11:49:50 -0700
commit9d01680430377b39dc34aaaf6ef315c49b3943cc (patch)
tree65b5ff873b8c6460122831772f227d1d08eac162 /module/zfs/zfs_ioctl.c
parent5a6765cf8cad21d22dc172b4089b655c9270d16a (diff)
Fix coverity defects: CID 147551, 147552
CID 147551: Type:dereference null return value CID 147552: Type:dereference null return value Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: cao.xuewen <[email protected]> Closes #5279
Diffstat (limited to 'module/zfs/zfs_ioctl.c')
-rw-r--r--module/zfs/zfs_ioctl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c
index 549a83116..e3166a40e 100644
--- a/module/zfs/zfs_ioctl.c
+++ b/module/zfs/zfs_ioctl.c
@@ -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)