diff options
author | 2008-10-24 06:34:55 +0000 | |
---|---|---|
committer | 2008-10-24 06:34:55 +0000 | |
commit | f9b40c8afafc9a47c301958a2788ac0941ff150b (patch) | |
tree | cf103df515d4220f0810268ec16e1d0997270323 | |
parent | it is a good policy to clear the pointer after we free something (diff) | |
download | wireguard-openbsd-f9b40c8afafc9a47c301958a2788ac0941ff150b.tar.xz wireguard-openbsd-f9b40c8afafc9a47c301958a2788ac0941ff150b.zip |
clear pointer after freeing it
-rw-r--r-- | sys/arch/i386/i386/pmap.c | 3 |
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) { |