Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Sep 2015 18:21:48 +0000 (UTC)
From:      Ryan Stone <rstone@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r287929 - stable/10/sys/kern
Message-ID:  <201509171821.t8HILm7n034330@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rstone
Date: Thu Sep 17 18:21:47 2015
New Revision: 287929
URL: https://svnweb.freebsd.org/changeset/base/287929

Log:
  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.

Modified:
  stable/10/sys/kern/uipc_syscalls.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/uipc_syscalls.c
==============================================================================
--- stable/10/sys/kern/uipc_syscalls.c	Thu Sep 17 18:19:55 2015	(r287928)
+++ stable/10/sys/kern/uipc_syscalls.c	Thu Sep 17 18:21:47 2015	(r287929)
@@ -2114,6 +2114,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?201509171821.t8HILm7n034330>