Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dc4501ff authored by Cong Wang's avatar Cong Wang Committed by David S. Miller
Browse files

tipc: fix a double free in tipc_enable_bearer()



bearer_disable() already calls kfree_rcu() to free struct tipc_bearer,
we don't need to call kfree() again.

Fixes: cb30a633 ("tipc: refactor function tipc_enable_bearer()")
Reported-by: default avatar <syzbot+b981acf1fb240c0c128b@syzkaller.appspotmail.com>
Cc: Ying Xue <ying.xue@windriver.com>
Cc: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b71acb0e
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -319,7 +319,6 @@ static int tipc_enable_bearer(struct net *net, const char *name,
	res = tipc_disc_create(net, b, &b->bcast_addr, &skb);
	if (res) {
		bearer_disable(net, b);
		kfree(b);
		errstr = "failed to create discoverer";
		goto rejected;
	}