mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 04:53:28 +00:00
sendfile: Fix error initialization in sendfile_getobj()
Reviewed by: chs, kib
Reported by: jhb
Fixes: faa998f6ff
MFC after: 1 day
Differential Revision: https://reviews.freebsd.org/D29540
This commit is contained in:
parent
fc56fd262d
commit
52a99c72b5
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user