Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 412e87ae authored by Herbert Xu's avatar Herbert Xu
Browse files

crypto: shash - Fix tfm destruction



We were freeing an offset into the slab object instead of the
start.  This patch fixes it by calling crypto_destroy_tfm which
allows the correct address to be given.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 7b2cd92a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -222,7 +222,7 @@ static inline struct crypto_tfm *crypto_shash_tfm(struct crypto_shash *tfm)


static inline void crypto_free_shash(struct crypto_shash *tfm)
static inline void crypto_free_shash(struct crypto_shash *tfm)
{
{
	crypto_free_tfm(crypto_shash_tfm(tfm));
	crypto_destroy_tfm(tfm, crypto_shash_tfm(tfm));
}
}


static inline unsigned int crypto_shash_alignmask(
static inline unsigned int crypto_shash_alignmask(