git: 69f4805c3698 - stable/13 - sendfile: Fix error initialization in sendfile_getobj()
Mark Johnston
markj at FreeBSD.org
Sat Apr 3 15:14:13 UTC 2021
The branch stable/13 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=69f4805c3698407a7cb3e107e37823c08419915d
commit 69f4805c3698407a7cb3e107e37823c08419915d
Author: Mark Johnston <markj at FreeBSD.org>
AuthorDate: 2021-04-02 21:12:56 +0000
Commit: Mark Johnston <markj at FreeBSD.org>
CommitDate: 2021-04-03 15:11:39 +0000
sendfile: Fix error initialization in sendfile_getobj()
Reviewed by: chs, kib
Reported by: jhb
Fixes: faa998f6ff695
Differential Revision: https://reviews.freebsd.org/D29540
(cherry picked from commit 52a99c72b5e1e58a8297d1e62854a5b765dc7d33)
---
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);
More information about the dev-commits-src-branches
mailing list