Correct the use of an unitialized variable in sendfind_getobj()
When sendfile_getobj() is called on a DTYPE_SHM file, it never initializes error, which is eventually returned to the caller. Differential Revision: https://reviews.freebsd.org/D1989 Reviewed by: kib Reported by: Brainy Code Scanner, by Maxime Villard.
This commit is contained in:
parent
e8da3e8aaf
commit
3d59729556
@ -2108,6 +2108,7 @@ sendfile_getobj(struct thread *td, struct file *fp, vm_object_t *obj_res,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
} else if (fp->f_type == DTYPE_SHM) {
|
} else if (fp->f_type == DTYPE_SHM) {
|
||||||
|
error = 0;
|
||||||
shmfd = fp->f_data;
|
shmfd = fp->f_data;
|
||||||
obj = shmfd->shm_object;
|
obj = shmfd->shm_object;
|
||||||
*obj_size = shmfd->shm_size;
|
*obj_size = shmfd->shm_size;
|
||||||
|
Loading…
Reference in New Issue
Block a user