diff --git a/net/tipc/crypto.c b/net/tipc/crypto.c
index 86eb6d679225c1a004f8f76f4bec48af08bba902..2301b66280def1e8a75f8391205a9be1c1f39348 100644
--- a/net/tipc/crypto.c
+++ b/net/tipc/crypto.c
@@ -1485,6 +1485,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;
 	}