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:
vanhu 2011-05-09 13:16:21 +00:00
parent 5064bc4392
commit 684e2951a0

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);