diff options
| -rw-r--r-- | crypto/af_alg.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/af_alg.c b/crypto/af_alg.c index 68ec1ac41..dc3ddef69 100644 --- a/crypto/af_alg.c +++ b/crypto/af_alg.c @@ -134,6 +134,12 @@ void af_alg_release_parent(struct sock *sk) bool last = nokey && !ask->refcnt; sk = ask->parent; + + if (ask->nokey_refcnt && !ask->refcnt) { + sock_put(sk); + return; + } + ask = alg_sk(sk); lock_sock(sk); |
