mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-22 11:17:19 +00:00
Fix mbuf leak when TCPMD5_OUTPUT() method returns error.
PR: 223817 MFC after: 1 week
This commit is contained in:
parent
b37b09244c
commit
2aad62408b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326847
@ -1239,12 +1239,13 @@ tcp_output(struct tcpcb *tp)
|
||||
* NOTE: since TCP options buffer doesn't point into
|
||||
* mbuf's data, calculate offset and use it.
|
||||
*/
|
||||
if (!TCPMD5_ENABLED() || TCPMD5_OUTPUT(m, th,
|
||||
(u_char *)(th + 1) + (to.to_signature - opt)) != 0) {
|
||||
if (!TCPMD5_ENABLED() || (error = TCPMD5_OUTPUT(m, th,
|
||||
(u_char *)(th + 1) + (to.to_signature - opt))) != 0) {
|
||||
/*
|
||||
* Do not send segment if the calculation of MD5
|
||||
* digest has failed.
|
||||
*/
|
||||
m_freem(m);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user