Skip to content

Commit cf0edf3

Browse files
committed
Cleanup: Delete dead code from send_merge_thread()
range is always deferenced before it reaches this check, such that the kmem_zalloc() call is never executed. There is also no need to set `range->eos_marker = B_TRUE` because it is already set. Coverity incorrectly complained about a potential NULL pointer dereference because of this. Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
1 parent dba4be4 commit cf0edf3

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

module/zfs/dmu_send.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1586,9 +1586,6 @@ send_merge_thread(void *arg)
15861586
}
15871587
range_free(front_ranges[i]);
15881588
}
1589-
if (range == NULL)
1590-
range = kmem_zalloc(sizeof (*range), KM_SLEEP);
1591-
range->eos_marker = B_TRUE;
15921589
bqueue_enqueue_flush(&smt_arg->q, range, 1);
15931590
spl_fstrans_unmark(cookie);
15941591
thread_exit();

0 commit comments

Comments
 (0)