summaryrefslogtreecommitdiff
path: root/net/tipc/udp_media.c
diff options
context:
space:
mode:
authorCong Wang <xiyou.wangcong@gmail.com>2018-12-10 12:45:45 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-09 16:16:41 +0100
commit336e822a0d48a65cd1d8ab6b5671ec737fb65c56 (patch)
treea1848c73dd983f3486a37feb203c557204813bab /net/tipc/udp_media.c
parentaa0c48d161954a700ba735e52d18af092079f460 (diff)
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: 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/tipc/udp_media.c')
-rw-r--r--net/tipc/udp_media.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c
index 107375d80c70..b6e5a1051ff3 100644
--- a/net/tipc/udp_media.c
+++ b/net/tipc/udp_media.c
@@ -243,10 +243,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: