diff options
author | andre <andre@FreeBSD.org> | 2006-09-17 13:39:35 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2006-09-17 13:39:35 +0000 |
commit | 34f4a99b52554d9bb4b09a9220ae8ff71a27c828 (patch) | |
tree | 7e760904092b072ef9a2e9e0781ed8672d26b562 /sys/netinet/tcp_usrreq.c | |
parent | 2d9e7e4a32c8c33011a4a625f3560ff186124090 (diff) | |
download | FreeBSD-src-34f4a99b52554d9bb4b09a9220ae8ff71a27c828.zip FreeBSD-src-34f4a99b52554d9bb4b09a9220ae8ff71a27c828.tar.gz |
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
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r-- | sys/netinet/tcp_usrreq.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 549627b..fb61602 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -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; } |