From b37e7ce6ef6b0a9f50f9df414bb94d29e8e990c6 Mon Sep 17 00:00:00 2001 From: itojun Date: Wed, 10 Dec 2003 23:46:42 +0000 Subject: [PATCH] do not touch sav->xx after key_freesav(). from hajimu umemoto --- sys/netkey/key.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/netkey/key.c b/sys/netkey/key.c index 9d2eb22cbcec..23dd02c44495 100644 --- a/sys/netkey/key.c +++ b/sys/netkey/key.c @@ -1,4 +1,4 @@ -/* $NetBSD: key.c,v 1.108 2003/12/04 19:38:25 atatat Exp $ */ +/* $NetBSD: key.c,v 1.109 2003/12/10 23:46:42 itojun Exp $ */ /* $KAME: key.c,v 1.310 2003/09/08 02:23:44 itojun Exp $ */ /* @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.108 2003/12/04 19:38:25 atatat Exp $"); +__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.109 2003/12/10 23:46:42 itojun Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -2697,10 +2697,11 @@ key_delsah(sah) /* sanity check */ KEY_CHKSASTATE(state, sav->state, "key_delsah"); - key_freesav(sav); - /* remove back pointer */ sav->sah = NULL; + + key_freesav(sav); + sav = NULL; } }