Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3009452f authored by Cong Wang's avatar Cong Wang Committed by Greg Kroah-Hartman
Browse files

tipc: fix a double kfree_skb()



[ Upstream commit acb4a33e9856d5fa3384b87d3d8369229be06d31 ]

tipc_udp_xmit() drops the packet on error, there is no
need to drop it again.

Fixes: ef20cd4d ("tipc: introduce UDP replicast")
Reported-and-tested-by: default avatar <syzbot+eae585ba2cc2752d3704@syzkaller.appspotmail.com>
Cc: Ying Xue <ying.xue@windriver.com>
Cc: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3bade4b7
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -243,11 +243,9 @@ 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:
	kfree_skb(skb);