diff --git a/sys/kern/kern_procctl.c b/sys/kern/kern_procctl.c index b6f6f1b772b..b2694fd0c32 100644 --- a/sys/kern/kern_procctl.c +++ b/sys/kern/kern_procctl.c @@ -509,8 +509,9 @@ aslr_status(struct thread *td, struct proc *p, int *data) _PHOLD(p); PROC_UNLOCK(p); vm = vmspace_acquire_ref(p); - if (vm != NULL && (vm->vm_map.flags & MAP_ASLR) != 0) { - d |= PROC_ASLR_ACTIVE; + if (vm != NULL) { + if ((vm->vm_map.flags & MAP_ASLR) != 0) + d |= PROC_ASLR_ACTIVE; vmspace_free(vm); } PROC_LOCK(p);