diff options
author | Cong Wang <[email protected]> | 2018-12-23 21:45:56 -0800 |
---|---|---|
committer | David S. Miller <[email protected]> | 2018-12-27 16:16:17 -0800 |
commit | dc4501ff287547dea7ca10f1c580c741291a8760 (patch) | |
tree | 0a10986ad2cdbfbe097751d9d6183185b5e8f86f | |
parent | b71acb0e372160167bf6d5500b88b30b52ccef6e (diff) |
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: cb30a63384bc ("tipc: refactor function tipc_enable_bearer()")
Reported-by: [email protected]
Cc: Ying Xue <[email protected]>
Cc: Jon Maloy <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
-rw-r--r-- | net/tipc/bearer.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index fb2c0d8f359f..d27f30a9a01d 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c @@ -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; } |