]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
tipc: fix a double kfree_skb()
authorCong Wang <xiyou.wangcong@gmail.com>
Mon, 10 Dec 2018 20:45:45 +0000 (12:45 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 Dec 2018 21:23:44 +0000 (13:23 -0800)
tipc_udp_xmit() drops the packet on error, there is no
need to drop it again.

Fixes: ef20cd4dd163 ("tipc: introduce UDP replicast")
Reported-and-tested-by: syzbot+eae585ba2cc2752d3704@syzkaller.appspotmail.com
Cc: Ying Xue <ying.xue@windriver.com>
Cc: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/udp_media.c

index 10dc59ce9c8221abbe0edce624d59bd0cf758d69..1b1ba1310ea7181f83fafbd97a3f207558d933b7 100644 (file)
@@ -245,10 +245,8 @@ static int tipc_udp_send_msg(struct net *net, struct sk_buff *skb,
                }
 
                err = tipc_udp_xmit(net, _skb, ub, src, &rcast->addr);
-               if (err) {
-                       kfree_skb(_skb);
+               if (err)
                        goto out;
-               }
        }
        err = 0;
 out: