tipc_mcast_xmit() calls tipc_msg_reassemble() to prepare an skb
for local delivery and queues it in localq. If the subsequent
tipc_mcast_send_sync() fails, the function skips local delivery
and purges only the original packet queue, leaking the skb in
localq. Purge localq before exiting on synchronization failure.
Fixes: dca4a17d24ee ("tipc: fix potential hanging after b/rcast changing")
Signed-off-by: Haoxiang Li <haox…@163.com>
---
net/tipc/bcast.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 10d1ec593084..086e2a953a13 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -409,6 +409,7 @@ int tipc_mcast_xmit(struct net *net, struct sk_buff_head *pkts,
if (unlikely(rc)) {
pr_err("Unable to send SYN: method %d, rc %d\n",
rcast, rc);
+ __skb_queue_purge(&localq);
goto exit;
}
}
--
2.25.1