diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-10-24 06:32:47 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-10-24 06:32:47 +0000 |
commit | 3f10f00a9e4916bd0ff4c4f50fc53177f69f900c (patch) | |
tree | d01af9d386b354b798e149a26603219d4c4423e4 /sys | |
parent | 678a4458ec420476f879899be3a0a8d03288eff9 (diff) |
it is a good policy to clear the pointer after we free something
Diffstat (limited to 'sys')
-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; } |