add missing key_freesp()s. part of
http://sources.zabbadoz.net/freebsd/patchset/110-ipsec-netkey-key.diff with some modification. Submitted by: "Bjoern A. Zeeb" <bzeeb+freebsd@zabbadoz.net> Reviewed by: itojun Obtained from: KAME
This commit is contained in:
parent
fb1ad3a85a
commit
e9c8752e56
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=124510
@ -2095,6 +2095,7 @@ key_spddelete(so, m, mhp)
|
||||
ipseclog((LOG_DEBUG,
|
||||
"key_spddelete2: attempt to remove persistent SP:%u.\n",
|
||||
sp->id));
|
||||
key_freesp(sp); /* ref gained by key_getsp */
|
||||
return key_senderror(so, m, EPERM);
|
||||
}
|
||||
|
||||
@ -2172,11 +2173,12 @@ key_spddelete2(so, m, mhp)
|
||||
ipseclog((LOG_DEBUG,
|
||||
"key_spddelete2: attempt to remove persistent SP:%u.\n",
|
||||
id));
|
||||
key_freesp(sp); /* ref gained by key_getspbyid */
|
||||
return key_senderror(so, m, EPERM);
|
||||
}
|
||||
|
||||
key_sp_dead(sp);
|
||||
key_freesp(sp); /* ref gained by key_getsp */
|
||||
key_freesp(sp); /* ref gained by key_getspbyid */
|
||||
key_sp_unlink(sp);
|
||||
sp = NULL;
|
||||
|
||||
@ -2277,6 +2279,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);
|
||||
|
Loading…
Reference in New Issue
Block a user