ipv4/igmp: fix build error if !CONFIG_IP_MULTICAST
commit 903869bd10e6719b9df6718e785be7ec725df59f upstream. 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()") Change-Id: I486d8608b0e56a1ebff5b7e41420d7639c625b19 Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
parent
492571c1bf
commit
8e5729b279
|
@ -176,6 +176,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
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -605,17 +616,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);
|
||||||
|
|
Loading…
Reference in New Issue