aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2023-12-12 18:20:03 +0000
committerKristof Provost <kp@FreeBSD.org>2023-12-14 21:05:34 +0000
commitc196e43243b83840cc9f3d1dadc7dacb3b0f556f (patch)
treebff8c186776c18ff121b2753f3c8bda39e8657b9
parent0bc82e4fbbe9d1eb72b6be512ff92a4908f85fef (diff)
downloadsrc-c196e43243b83840cc9f3d1dadc7dacb3b0f556f.tar.gz
src-c196e43243b83840cc9f3d1dadc7dacb3b0f556f.zip
Revert "mcast: fix memory leak in imf_purge()"
This reverts commit fa03d37432caf17d56a931a9e6f5d9b06f102c5b. This commit caused us to not send IGMP leave messages if the inpcb went away. In other words: we freed pending packets whenever the socket closed rather than when the interface (or address) goes away. Reviewed by: glebius Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D43032
-rw-r--r--sys/netinet/in_mcast.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c
index ee707414dc42..cae15bc4108a 100644
--- a/sys/netinet/in_mcast.c
+++ b/sys/netinet/in_mcast.c
@@ -914,8 +914,6 @@ imf_purge(struct in_mfilter *imf)
imf->imf_st[0] = imf->imf_st[1] = MCAST_UNDEFINED;
KASSERT(RB_EMPTY(&imf->imf_sources),
("%s: imf_sources not empty", __func__));
- if (imf->imf_inm != NULL)
- mbufq_drain(&imf->imf_inm->inm_scq);
}
/*