If tipc_msg_reassemble() fails to allocate memory or tipc_mcast_send_sync() fails to send a SYN message, tipc_mcast_xmit() returns without freeing the SKBs in the local queue. This issue was found through code inspection. Fix this by freeing the local queue before returning from tipc_mcast_xmit(). Fixes: a853e4c6d084 ("tipc: introduce replicast as transport option for multicast") Fixes: dca4a17d24ee ("tipc: fix potential hanging after b/rcast changing") Co-developed-by: Haoxiang Li Signed-off-by: Haoxiang Li Signed-off-by: Tung Nguyen --- net/tipc/bcast.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c index 10d1ec593084..d95b3c62a2c9 100644 --- a/net/tipc/bcast.c +++ b/net/tipc/bcast.c @@ -424,8 +424,9 @@ int tipc_mcast_xmit(struct net *net, struct sk_buff_head *pkts, tipc_sk_mcast_rcv(net, &localq, &inputq); } exit: - /* This queue should normally be empty by now */ + /* These queues should normally be empty by now */ __skb_queue_purge(pkts); + __skb_queue_purge(&localq); return rc; } -- 2.53.0