diff options
Diffstat (limited to 'net/tipc/crypto.c')
| -rw-r--r-- | net/tipc/crypto.c | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/net/tipc/crypto.c b/net/tipc/crypto.c index f4fca8f7f63f..97710ce36047 100644 --- a/net/tipc/crypto.c +++ b/net/tipc/crypto.c @@ -1941,12 +1941,13 @@ static void tipc_crypto_rcv_complete(struct net *net, struct tipc_aead *aead,  			goto rcv;  		if (tipc_aead_clone(&tmp, aead) < 0)  			goto rcv; +		WARN_ON(!refcount_inc_not_zero(&tmp->refcnt));  		if (tipc_crypto_key_attach(rx, tmp, ehdr->tx_key, false) < 0) {  			tipc_aead_free(&tmp->rcu);  			goto rcv;  		}  		tipc_aead_put(aead); -		aead = tipc_aead_get(tmp); +		aead = tmp;  	}  	if (unlikely(err)) { |