diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c index 30995fe4def1..6df1537527a2 100644 --- a/sys/kern/kern_sendfile.c +++ b/sys/kern/kern_sendfile.c @@ -945,6 +945,7 @@ sendfile(struct thread *td, struct sendfile_args *uap, int compat) if (uap->offset < 0) return (EINVAL); + sbytes = 0; hdr_uio = trl_uio = NULL; if (uap->hdtr != NULL) {