vmm: Initialize error in vmmdev_rw
CID: 1568045
Reported by: Coverity Scan
Reviewed by: markj
Fixes: 4008758105 vmm: Validate credentials when opening a vmmdev
Differential Revision: https://reviews.freebsd.org/D48073
This commit is contained in:
@@ -195,6 +195,7 @@ vmmdev_rw(struct cdev *cdev, struct uio *uio, int flags)
|
||||
*/
|
||||
vm_slock_memsegs(sc->vm);
|
||||
|
||||
error = 0;
|
||||
prot = (uio->uio_rw == UIO_WRITE ? VM_PROT_WRITE : VM_PROT_READ);
|
||||
maxaddr = vmm_sysmem_maxaddr(sc->vm);
|
||||
while (uio->uio_resid > 0 && error == 0) {
|
||||
|
||||
Reference in New Issue
Block a user