tcp: When rack or bbr get a pullup failure in the common code, don't free the NULL mbuf.
There is a bug in the error path where rack_bbr_common does a m_pullup() and the pullup fails. There is a stray mfree(m) after m is set to NULL. This is not a good idea :-) Reviewed by: tuexen Sponsored by: Netflix Inc. Differential Revision: https://reviews.freebsd.org/D31194
This commit is contained in:
parent
cf98bc28d3
commit
db4d2d7222
@ -210,7 +210,6 @@ ctf_get_enet_type(struct ifnet *ifp, struct mbuf *m)
|
||||
m = m_pullup(m, sizeof(*ip6) + sizeof(*th));
|
||||
if (m == NULL) {
|
||||
KMOD_TCPSTAT_INC(tcps_rcvshort);
|
||||
m_freem(m);
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
@ -243,7 +242,6 @@ ctf_get_enet_type(struct ifnet *ifp, struct mbuf *m)
|
||||
m = m_pullup(m, sizeof (struct tcpiphdr));
|
||||
if (m == NULL) {
|
||||
KMOD_TCPSTAT_INC(tcps_rcvshort);
|
||||
m_freem(m);
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user