提交 46702dd5 编写于 作者: E Eric Dumazet 提交者: Greg Kroah-Hartman

ipv4/igmp: fix build error if !CONFIG_IP_MULTICAST

[ Upstream commit 903869bd10e6719b9df6718e785be7ec725df59f ]

ip_sf_list_clear_all() needs to be defined even if !CONFIG_IP_MULTICAST

Fixes: 3580d04aa674 ("ipv4/igmp: fix another memory leak in igmpv3_del_delrec()")
Signed-off-by: NEric Dumazet <edumazet@google.com>
Reported-by: Nkbuild test robot <lkp@intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 e9f94e48
...@@ -190,6 +190,17 @@ static void ip_ma_put(struct ip_mc_list *im) ...@@ -190,6 +190,17 @@ static void ip_ma_put(struct ip_mc_list *im)
pmc != NULL; \ pmc != NULL; \
pmc = rtnl_dereference(pmc->next_rcu)) pmc = rtnl_dereference(pmc->next_rcu))
static void ip_sf_list_clear_all(struct ip_sf_list *psf)
{
struct ip_sf_list *next;
while (psf) {
next = psf->sf_next;
kfree(psf);
psf = next;
}
}
#ifdef CONFIG_IP_MULTICAST #ifdef CONFIG_IP_MULTICAST
/* /*
...@@ -635,17 +646,6 @@ static void igmpv3_clear_zeros(struct ip_sf_list **ppsf) ...@@ -635,17 +646,6 @@ static void igmpv3_clear_zeros(struct ip_sf_list **ppsf)
} }
} }
static void ip_sf_list_clear_all(struct ip_sf_list *psf)
{
struct ip_sf_list *next;
while (psf) {
next = psf->sf_next;
kfree(psf);
psf = next;
}
}
static void kfree_pmc(struct ip_mc_list *pmc) static void kfree_pmc(struct ip_mc_list *pmc)
{ {
ip_sf_list_clear_all(pmc->sources); ip_sf_list_clear_all(pmc->sources);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册