crypto: aead - Add type-safe function for freeing instances

This patch adds a type-safe function for freeing AEAD instances
to struct aead_instance.  This replaces the existing free function
in struct crypto_template which does not know the type of the
instance that it's freeing.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Herbert Xu
2015-07-09 07:17:17 +08:00
parent 319382a697
commit ba75e15fa0
2 changed files with 14 additions and 0 deletions

View File

@@ -21,6 +21,7 @@
struct rtattr;
struct aead_instance {
void (*free)(struct aead_instance *inst);
union {
struct {
char head[offsetof(struct aead_alg, base)];