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:
Robert Watson 2004-08-12 01:34:27 +00:00
parent 4f34d8d132
commit c19c5239a6

View File

@ -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);