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.
This commit is contained in:
rstone 2015-09-17 18:21:47 +00:00
parent b58eab535b
commit a5578a13a3

View File

@ -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;