diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c index 7efd6d59aa0d..d60f6207a5d2 100644 --- a/sys/netipsec/key.c +++ b/sys/netipsec/key.c @@ -1,4 +1,4 @@ -/* $NetBSD: key.c,v 1.43 2007/03/21 22:38:34 degroote Exp $ */ +/* $NetBSD: key.c,v 1.44 2007/04/09 21:07:03 degroote Exp $ */ /* $FreeBSD: src/sys/netipsec/key.c,v 1.3.2.3 2004/02/14 22:23:23 bms Exp $ */ /* $KAME: key.c,v 1.191 2001/06/27 10:46:49 sakane Exp $ */ @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.43 2007/03/21 22:38:34 degroote Exp $"); +__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.44 2007/04/09 21:07:03 degroote Exp $"); /* * This code is referd to RFC 2367 @@ -2263,6 +2263,7 @@ key_spdget(so, m, mhp) } n = key_setdumpsp(sp, SADB_X_SPDGET, 0, mhp->msg->sadb_msg_pid); + KEY_FREESP(&sp); /* ref gained by key_getspbyid */ if (n != NULL) { m_freem(m); return key_sendup_mbuf(so, n, KEY_SENDUP_ONE);