igmp: Avoid leaking mbuf when source validation fails

PR:		252504
Submitted by:	Panagiotis Tsolakos <panagiotis.tsolakos@gmail.com>
MFC after:	3 days
This commit is contained in:
Mark Johnston 2021-01-08 13:32:04 -05:00
parent 431980466f
commit 501159696c

View File

@ -1589,6 +1589,7 @@ igmp_input(struct mbuf **mp, int *offp, int proto)
if (nsrc * sizeof(in_addr_t) >
UINT16_MAX - iphlen - IGMP_V3_QUERY_MINLEN) {
IGMPSTAT_INC(igps_rcv_tooshort);
m_freem(m);
return (IPPROTO_DONE);
}
/*