summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2008-10-24 06:34:56 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2008-10-24 06:34:56 +0000
commitf28b4baf5670a294d58edd91d421f6016ae35864 (patch)
tree60fb53e7b438164f17188e13e766e5a7b243dc05 /sys
parent3f10f00a9e4916bd0ff4c4f50fc53177f69f900c (diff)
clear pointer after freeing it
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/i386/pmap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c
index 44d6bc3c41c..45a159221ff 100644
--- a/sys/arch/i386/i386/pmap.c
+++ b/sys/arch/i386/i386/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.123 2008/06/14 18:09:47 hshoexer Exp $ */
+/* $OpenBSD: pmap.c,v 1.124 2008/10/24 06:34:55 deraadt Exp $ */
/* $NetBSD: pmap.c,v 1.91 2000/06/02 17:46:37 thorpej Exp $ */
/*
@@ -1547,6 +1547,7 @@ pmap_release(struct pmap *pmap)
* APTE space because we do that in pmap_unmap_ptes().
*/
uvm_km_free(kernel_map, (vaddr_t)pmap->pm_pdir, NBPG);
+ pmap->pm_pdir = NULL;
#ifdef USER_LDT
if (pmap->pm_flags & PMF_USER_LDT) {