summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2020-10-19 17:57:44 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2020-10-19 17:57:44 +0000
commit4b0184132331fc46239f426cf0962306178e6e34 (patch)
treef8c95273b2eab671bf6d78faa9aa1e6c6384109a
parent6456e6e4155883e99c0a5af69f853348060db220 (diff)
Clear vmspace pointer in struct process before calling uvmspace_free(9).
ok patrick@, mpi@
-rw-r--r--sys/uvm/uvm_glue.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/uvm/uvm_glue.c b/sys/uvm/uvm_glue.c
index 36105185591..390307c4c81 100644
--- a/sys/uvm/uvm_glue.c
+++ b/sys/uvm/uvm_glue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_glue.c,v 1.75 2019/06/21 09:39:49 visa Exp $ */
+/* $OpenBSD: uvm_glue.c,v 1.76 2020/10/19 17:57:43 kettenis Exp $ */
/* $NetBSD: uvm_glue.c,v 1.44 2001/02/06 19:54:44 eeh Exp $ */
/*
@@ -293,8 +293,10 @@ uvm_uarea_free(struct proc *p)
void
uvm_exit(struct process *pr)
{
- uvmspace_free(pr->ps_vmspace);
+ struct vmspace *vm = pr->ps_vmspace;
+
pr->ps_vmspace = NULL;
+ uvmspace_free(vm);
}
/*