udp: Fix a memory leak in udp6_send()

Reviewed by:	glebius
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D38993
This commit is contained in:
Mark Johnston 2023-03-14 10:26:29 -04:00
parent 2ef8baba4c
commit e9ea690ae8

View File

@ -766,10 +766,10 @@ udp6_send(struct socket *so, int flags_arg, struct mbuf *m,
* Given this is either an IPv6-only socket or no INET is
* supported we will fail the send if the given destination
* address is a v4mapped address.
*
* XXXGL: do we leak m and control?
*/
INP_UNLOCK(inp);
m_freem(m);
m_freem(control);
return (EINVAL);
}