diff options
author | 2008-10-24 06:32:46 +0000 | |
---|---|---|
committer | 2008-10-24 06:32:46 +0000 | |
commit | 4682359a8c7e500fc4b7dff48189954a7e03f1ef (patch) | |
tree | d1b9bcfd6cf82707ccbb89669d9ac214d1e749d0 | |
parent | remove unused label (diff) | |
download | wireguard-openbsd-4682359a8c7e500fc4b7dff48189954a7e03f1ef.tar.xz wireguard-openbsd-4682359a8c7e500fc4b7dff48189954a7e03f1ef.zip |
it is a good policy to clear the pointer after we free something
-rw-r--r-- | sys/uvm/uvm_glue.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/uvm/uvm_glue.c b/sys/uvm/uvm_glue.c index af540e42f72..2e2691518b0 100644 --- a/sys/uvm/uvm_glue.c +++ b/sys/uvm/uvm_glue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_glue.c,v 1.47 2007/05/26 20:26:51 pedro Exp $ */ +/* $OpenBSD: uvm_glue.c,v 1.48 2008/10/24 06:32:46 deraadt Exp $ */ /* $NetBSD: uvm_glue.c,v 1.44 2001/02/06 19:54:44 eeh Exp $ */ /* @@ -282,6 +282,7 @@ void uvm_exit(struct proc *p) { uvmspace_free(p->p_vmspace); + p->p_vmspace = NULL; uvm_km_free(kernel_map, (vaddr_t)p->p_addr, USPACE); p->p_addr = NULL; } |