Date: Sat, 28 Feb 2015 21:50:00 +0000 (UTC) From: Ryan Stone <rstone@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279410 - head/sys/kern Message-ID: <201502282150.t1SLo0s0006793@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502282150.t1SLo0s0006793>