Date: Fri, 2 Apr 2021 21:51:38 GMT From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 52a99c72b5e1 - main - sendfile: Fix error initialization in sendfile_getobj() Message-ID: <202104022151.132Lpc8U027183@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=52a99c72b5e1e58a8297d1e62854a5b765dc7d33 commit 52a99c72b5e1e58a8297d1e62854a5b765dc7d33 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2021-04-02 21:12:56 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2021-04-02 21:42:38 +0000 sendfile: Fix error initialization in sendfile_getobj() Reviewed by: chs, kib Reported by: jhb Fixes: faa998f6ff695 MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D29540 --- sys/kern/kern_sendfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c index 95bfba0538dc..520b7c9c62d0 100644 --- a/sys/kern/kern_sendfile.c +++ b/sys/kern/kern_sendfile.c @@ -571,6 +571,7 @@ sendfile_getobj(struct thread *td, struct file *fp, vm_object_t *obj_res, struct shmfd *shmfd; int error; + error = 0; vp = *vp_res = NULL; obj = NULL; shmfd = *shmfd_res = NULL; @@ -610,7 +611,6 @@ sendfile_getobj(struct thread *td, struct file *fp, vm_object_t *obj_res, VM_OBJECT_RLOCK(obj); } } else if (fp->f_type == DTYPE_SHM) { - error = 0; shmfd = fp->f_data; obj = shmfd->shm_object; VM_OBJECT_RLOCK(obj);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104022151.132Lpc8U027183>