udp: Fix a memory leak in udp6_send()

Reviewed by:	glebius
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D38993

(cherry picked from commit e9ea690ae8)
This commit is contained in:
Mark Johnston 2023-03-14 10:26:29 -04:00
parent b09eed11cf
commit a16d3089b2

View file

@ -803,10 +803,10 @@ udp6_output(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);
}