summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_mmap.c
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2007-06-17 04:17:48 +0000
committermjacob <mjacob@FreeBSD.org>2007-06-17 04:17:48 +0000
commitfadc531504ab13969d3e9e97c4390965c067bcb1 (patch)
treeaa0b66f100533c0bc2f3b9f017b014a5624078ad /sys/vm/vm_mmap.c
parentcd7cf5829bfb2674a57a49a7aabdd112cc5cfed9 (diff)
downloadFreeBSD-src-fadc531504ab13969d3e9e97c4390965c067bcb1.zip
FreeBSD-src-fadc531504ab13969d3e9e97c4390965c067bcb1.tar.gz
Make sure object is NULL- there is a possible case where you could
fall through to it being used w/o being set. Put a break in the default case.
Diffstat (limited to 'sys/vm/vm_mmap.c')
-rw-r--r--sys/vm/vm_mmap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c
index ff1ba18..b91b822 100644
--- a/sys/vm/vm_mmap.c
+++ b/sys/vm/vm_mmap.c
@@ -1291,7 +1291,7 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, vm_size_t size, vm_prot_t prot,
vm_ooffset_t foff)
{
boolean_t fitit;
- vm_object_t object;
+ vm_object_t object = NULL;
int rv = KERN_SUCCESS;
int docow, error;
struct thread *td = curthread;
@@ -1349,6 +1349,7 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, vm_size_t size, vm_prot_t prot,
/* FALLTHROUGH */
default:
error = EINVAL;
+ break;
}
if (error)
return (error);
OpenPOWER on IntegriCloud