Release SP's refcount in key_get_spdbyid().

PR:	156676
Submitted by: Tobias Brunner (tobias@strongswan.org)
MFC after:	1 week
This commit is contained in:
VANHULLEBUS Yvan 2011-05-09 13:16:21 +00:00
parent 9a086c6988
commit 568fac6f2e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=221692

View File

@ -2283,6 +2283,7 @@ key_spdget(so, m, mhp)
}
n = key_setdumpsp(sp, SADB_X_SPDGET, 0, mhp->msg->sadb_msg_pid);
KEY_FREESP(&sp);
if (n != NULL) {
m_freem(m);
return key_sendup_mbuf(so, n, KEY_SENDUP_ONE);