mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2025-04-19 20:58:31 +09:00
crypto: api - Call crypto_alg_put in crypto_unregister_alg
Instead of calling cra_destroy by hand, call it through crypto_alg_put so that the correct unwinding functions are called through crypto_destroy_alg. Fixes: 3d6979bf3bd5 ("crypto: api - Add cra_type->destroy hook") Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
5a06ef1f8d
commit
27b1342534
@ -464,8 +464,7 @@ void crypto_unregister_alg(struct crypto_alg *alg)
|
||||
if (WARN_ON(refcount_read(&alg->cra_refcnt) != 1))
|
||||
return;
|
||||
|
||||
if (alg->cra_destroy)
|
||||
alg->cra_destroy(alg);
|
||||
crypto_alg_put(alg);
|
||||
|
||||
crypto_remove_final(&list);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user