diff options
author | Eric Dumazet <edumazet@google.com> | 2019-05-23 04:35:16 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-23 08:08:06 +0300 |
commit | 903869bd10e6719b9df6718e785be7ec725df59f (patch) | |
tree | 46dfe64299fda30250c414a7f915760d74b0a785 | |
parent | 3580d04aa674383c42de7b635d28e52a1e5bc72c (diff) | |
download | linux-903869bd10e6719b9df6718e785be7ec725df59f.tar.xz |
ipv4/igmp: fix build error if !CONFIG_IP_MULTICAST
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: Eric Dumazet <edumazet@google.com>
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/igmp.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 1a8d36dd49d4..eb03153dfe12 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -188,6 +188,17 @@ static void ip_ma_put(struct ip_mc_list *im) pmc != NULL; \ 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 /* @@ -633,17 +644,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) { ip_sf_list_clear_all(pmc->sources); |