mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-19 15:33:56 +00:00
Make tcp_usr_send() free the passed mbufs on error in all cases as the
comment to it claims. Sponsored by: TCP/IP Optimization Fundraise 2005
This commit is contained in:
parent
78ba57b9e1
commit
7ff0b850a6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=162376
@ -800,6 +800,10 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf *m,
|
||||
KASSERT(inp != NULL, ("tcp_usr_send: inp == NULL"));
|
||||
INP_LOCK(inp);
|
||||
if (inp->inp_vflag & (INP_TIMEWAIT | INP_DROPPED)) {
|
||||
if (control)
|
||||
m_freem(control);
|
||||
if (m)
|
||||
m_freem(m);
|
||||
error = EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user