From c077090a9b11d42c0734f0741ca08d0c9b6b37b0 Mon Sep 17 00:00:00 2001 From: luozhengzheng Date: Fri, 9 Dec 2016 05:48:09 +0800 Subject: [PATCH] Fix coverity defects: CID 154617 CID 154617: Memory - illegal accesses (UNINIT) The value here just needs to be initialized to make Coverity happy. When dsize == 0, then value of daiter.iter_mapaddr is irrelevant. That address won't be accessed, it's only used for some arithmetic. dsize can be zero either if dabd is null, or if code column is longer than the current data column. Reviewed-by: Gvozden Neskovic Reviewed-by: Brian Behlendorf Signed-off-by: luozhengzheng Closes #5437 --- module/zfs/abd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zfs/abd.c b/module/zfs/abd.c index d14564b33..15d998a3b 100644 --- a/module/zfs/abd.c +++ b/module/zfs/abd.c @@ -1321,7 +1321,7 @@ abd_raidz_gen_iterate(abd_t **cabds, abd_t *dabd, int i; ssize_t len, dlen; struct abd_iter caiters[3]; - struct abd_iter daiter; + struct abd_iter daiter = {0}; void *caddrs[3]; unsigned long flags;