提交 e671174c 编写于 作者: C Cong Wang 提交者: Xie XiuQi

tipc: fix a double kfree_skb()

[ Upstream commit acb4a33e ]

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: NCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 86ae1c8b
...@@ -245,10 +245,8 @@ static int tipc_udp_send_msg(struct net *net, struct sk_buff *skb, ...@@ -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); err = tipc_udp_xmit(net, _skb, ub, src, &rcast->addr);
if (err) { if (err)
kfree_skb(_skb);
goto out; goto out;
}
} }
err = 0; err = 0;
out: out:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册