When udp_send() fails, make sure to free the control mbufs as well as
the data mbuf. This was done in most error cases, but not the case where the inpcb pointer is surprisingly NULL.
This commit is contained in:
parent
4f34d8d132
commit
c19c5239a6
@ -1072,6 +1072,8 @@ udp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr,
|
||||
if (inp == 0) {
|
||||
INP_INFO_WUNLOCK(&udbinfo);
|
||||
m_freem(m);
|
||||
if (control != NULL)
|
||||
m_freem(control);
|
||||
return EINVAL;
|
||||
}
|
||||
INP_LOCK(inp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user