diff options
author | rstone <rstone@FreeBSD.org> | 2015-09-17 18:21:47 +0000 |
---|---|---|
committer | rstone <rstone@FreeBSD.org> | 2015-09-17 18:21:47 +0000 |
commit | a5578a13a31cb57fe230f49fe8e7f959295992cd (patch) | |
tree | fd0440456f2a2ad3ba2a3e01983a8e8807fc6ea8 /sys/kern/uipc_syscalls.c | |
parent | b58eab535b4726f142051f162cd221b1bc443944 (diff) | |
download | FreeBSD-src-a5578a13a31cb57fe230f49fe8e7f959295992cd.zip FreeBSD-src-a5578a13a31cb57fe230f49fe8e7f959295992cd.tar.gz |
MFC r279410:
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.
Diffstat (limited to 'sys/kern/uipc_syscalls.c')
-rw-r--r-- | sys/kern/uipc_syscalls.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 708457d..fa36849 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -2114,6 +2114,7 @@ sendfile_getobj(struct thread *td, struct file *fp, vm_object_t *obj_res, goto out; } } else if (fp->f_type == DTYPE_SHM) { + error = 0; shmfd = fp->f_data; obj = shmfd->shm_object; *obj_size = shmfd->shm_size; |