mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-15 06:42:51 +01:00
procctl(PROC_ASLR_STATUS): fix vmspace leak
Reported by: jhb Sponsored by: The FreeBSD Foundation MFC after: 3 days
This commit is contained in:
parent
9873c807da
commit
0bdb2cbf9d
@ -530,8 +530,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);
|
||||
|
Loading…
Reference in New Issue
Block a user