diff options
author | Cong Wang <xiyou.wangcong@gmail.com> | 2018-12-10 21:45:45 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-14 22:23:44 +0100 |
commit | acb4a33e9856d5fa3384b87d3d8369229be06d31 (patch) | |
tree | 81fc7dcc41ceb8ffd3d60d3db37e949937afbdf1 /net | |
parent | tipc: use lock_sock() in tipc_sk_reinit() (diff) | |
download | linux-acb4a33e9856d5fa3384b87d3d8369229be06d31.tar.xz linux-acb4a33e9856d5fa3384b87d3d8369229be06d31.zip |
tipc: fix a double kfree_skb()
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/tipc/udp_media.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c index 10dc59ce9c82..1b1ba1310ea7 100644 --- a/net/tipc/udp_media.c +++ b/net/tipc/udp_media.c @@ -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: |