diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2021-03-31 16:36:02 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-31 14:52:00 -0700 |
commit | ac1db7acea67777be1ba86e36e058c479eab6508 (patch) | |
tree | 050998dd24caa6c9b4bd3d696dffc7b13d8de117 /net/tipc | |
parent | ab1b4f0a836f437d44f97cb8a6f444e4c5176cef (diff) |
net/tipc: fix missing destroy_workqueue() on error in tipc_crypto_start()
Add the missing destroy_workqueue() before return from
tipc_crypto_start() in the error handling case.
Fixes: 1ef6f7c9390f ("tipc: add automatic session key exchange")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/crypto.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/tipc/crypto.c b/net/tipc/crypto.c index 6f64acef73dc..76b8428c94a7 100644 --- a/net/tipc/crypto.c +++ b/net/tipc/crypto.c @@ -1492,6 +1492,8 @@ int tipc_crypto_start(struct tipc_crypto **crypto, struct net *net, /* Allocate statistic structure */ c->stats = alloc_percpu_gfp(struct tipc_crypto_stats, GFP_ATOMIC); if (!c->stats) { + if (c->wq) + destroy_workqueue(c->wq); kfree_sensitive(c); return -ENOMEM; } |