From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64F91C28CC7 for ; Mon, 3 Jun 2019 09:19:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3EB0D27FCC for ; Mon, 3 Jun 2019 09:19:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559553543; bh=6Ajabuw9ON+eshjxs/JE69Gi3UxizKO+uTGIS/9UZe4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=SbrQeBu+LeLzMZVORAQ2zsdiPErj/Qa96n8k6aEMOnKrbF9GDnjTanylyp08AXQb8 aM7/HTUb58GRW0qk0T/DFfSSD2bYHrXHOZLBi0GdGkezPtTi7AyBHyhg47jLmaa03A 35BL1Wr/c1ybAyN7zUsgqOIlG+S2nbsW309tiRKo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727642AbfFCJS6 (ORCPT ); Mon, 3 Jun 2019 05:18:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:53948 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726555AbfFCJJw (ORCPT ); Mon, 3 Jun 2019 05:09:52 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6DC3927E18; Mon, 3 Jun 2019 09:09:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559552991; bh=6Ajabuw9ON+eshjxs/JE69Gi3UxizKO+uTGIS/9UZe4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JZGd9qGuspNxnwvMKx0o+gBJACgB5Ji9/AnvmKZ/WxxsyAnmtv3OArwb+iS6TWo5G Bm+2QREqbi7b+sS8DYchhCdbMwRz8Ekt7OtcfZfrb2XmS0VskRhQJqxw5CNYPfcLcu SWJh79o7b0vhFw7XK9kcHxmMNOY014xoVvNC4K3w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , kbuild test robot , "David S. Miller" Subject: [PATCH 4.19 05/32] ipv4/igmp: fix build error if !CONFIG_IP_MULTICAST Date: Mon, 3 Jun 2019 11:07:59 +0200 Message-Id: <20190603090309.928015545@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190603090308.472021390@linuxfoundation.org> References: <20190603090308.472021390@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Eric Dumazet [ 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: Eric Dumazet Reported-by: kbuild test robot Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv4/igmp.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -190,6 +190,17 @@ static void ip_ma_put(struct ip_mc_list 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 /* @@ -635,17 +646,6 @@ static void igmpv3_clear_zeros(struct ip } } -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);