crypto: algapi - enforce that all instances have a ->free() method
authorEric Biggers <ebiggers@google.com>
Fri, 3 Jan 2020 04:04:40 +0000 (20:04 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 9 Jan 2020 03:30:58 +0000 (11:30 +0800)
commitd4fdc2dfaa755e0bf22de6a2774cac2e5ae45cf4
tree18c2e44d234eaff00fbb2b9ae243d4ea69619651
parenta24a1fd731274ebbca873000e2c7fbe8224ae4c8
crypto: algapi - enforce that all instances have a ->free() method

All instances need to have a ->free() method, but people could forget to
set it and then not notice if the instance is never unregistered.  To
help detect this bug earlier, don't allow an instance without a ->free()
method to be registered, and complain loudly if someone tries to do it.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/aead.c
crypto/ahash.c
crypto/akcipher.c
crypto/shash.c
crypto/skcipher.c