mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
tipc: fix a double free in tipc_enable_bearer()
[ Upstream commitdc4501ff28] bearer_disable() already calls kfree_rcu() to free struct tipc_bearer, we don't need to call kfree() again. Fixes:cb30a63384("tipc: refactor function tipc_enable_bearer()") Reported-by: syzbot+b981acf1fb240c0c128b@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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a2ee6fb9c6
commit
f404723deb
@@ -317,7 +317,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user