]> granicus.if.org Git - zfs/commitdiff
Fix coverity defects: CID 154591
authorluozhengzheng <luo.zhengzheng@zte.com.cn>
Wed, 30 Nov 2016 17:48:01 +0000 (01:48 +0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 30 Nov 2016 17:48:01 +0000 (10:48 -0700)
CID 154591: Incorrect expression (SIZEOF_MISMATCH)

Reviewed-by: Gvozden Neskovic <neskovic@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: luozhengzheng <luo.zhengzheng@zte.com.cn>
Closes #5435

cmd/zpool/zpool_iter.c

index b397c7ec2f347b4d0c29554f31bd94a2ee2b6e07..ac64e977e98770ad636f5453203ce58668fad0b6 100644 (file)
@@ -447,7 +447,7 @@ vdev_cmd_data_list_t *
 all_pools_for_each_vdev_run(int argc, char **argv, char *cmd)
 {
        vdev_cmd_data_list_t *vcdl;
-       vcdl = safe_malloc(sizeof (vcdl));
+       vcdl = safe_malloc(sizeof (vdev_cmd_data_list_t));
        vcdl->cmd = cmd;
 
        /* Gather our list of all vdevs in all pools */