HomeFreeBSD

mcast: fix memory leak in imf_purge()

Description

mcast: fix memory leak in imf_purge()

The IGMP code buffers packets in the imf_inm->inm_scq mbufq, but does
not clear this queue when struct in_mfilter is freed by imf_purge().
This can cause memory leaks if IGMPv3 is used.

Purge the mbufq on imf_purge().

MFC after: 1 week
Approved by: re (gjb)
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D41629

(cherry picked from commit fa03d37432caf17d56a931a9e6f5d9b06f102c5b)

Details

Provenance
kpAuthored on Aug 29 2023, 9:33 AM
Differential Revision
D41629: mcast: fix memory leak in imf_purge()
Parents
rG70323196c2b1: vmxnet3: do restart on VLAN changes
Branches
Unknown
Tags
Unknown