Commit acb4a33e authored by Cong Wang's avatar Cong Wang Committed by David S. Miller

tipc: fix a double kfree_skb()

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: 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>
parent 15ef70e2
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment