Author: rstone Date: Sat Feb 28 21:49:59 2015 New Revision: 279410 URL: https://svnweb.freebsd.org/changeset/base/279410
Log: 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. Modified: head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Sat Feb 28 21:20:46 2015 (r279409) +++ head/sys/kern/uipc_syscalls.c Sat Feb 28 21:49:59 2015 (r279410) @@ -2108,6 +2108,7 @@ sendfile_getobj(struct thread *td, struc goto out; } } else if (fp->f_type == DTYPE_SHM) { + error = 0; shmfd = fp->f_data; obj = shmfd->shm_object; *obj_size = shmfd->shm_size; _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"